* Added unstrip fix for GetRootSceneObjects using Il2CPP internal call
This commit is contained in:
sinaioutlander
2020-10-09 21:11:15 +11:00
parent 35eb78ca5d
commit 867370ccee
15 changed files with 532 additions and 446 deletions

View File

@ -2,6 +2,9 @@
using System.Reflection;
using UnityEngine;
using Explorer.Input;
#if CPP
using UnhollowerBaseLib;
#endif
namespace Explorer
{
@ -15,7 +18,7 @@ namespace Explorer
{
inputModule = new InputSystem();
}
else if (LegacyInput.TInput != null || TryLoadModule("UnityEngine.Input", LegacyInput.TInput))
else if (LegacyInput.TInput != null || TryLoadModule("UnityEngine.InputLegacyModule", LegacyInput.TInput))
{
inputModule = new LegacyInput();
}
@ -38,5 +41,34 @@ namespace Explorer
public static bool GetMouseButtonDown(int btn) => inputModule.GetMouseButtonDown(btn);
public static bool GetMouseButton(int btn) => inputModule.GetMouseButton(btn);
//#if CPP
//#pragma warning disable IDE1006
// // public extern static string compositionString { get; }
// internal delegate string get_compositionString_delegate();
// internal static get_compositionString_delegate get_compositionString_iCall =
// IL2CPP.ResolveICall<get_compositionString_delegate>("UnityEngine.Input::get_compositionString");
// public static string compositionString => get_compositionString_iCall();
// // public extern static Vector2 compositionCursorPos { get; set; }
// internal delegate Vector2 get_compositionCursorPos_delegate();
// internal static get_compositionCursorPos_delegate get_compositionCursorPos_iCall =
// IL2CPP.ResolveICall<get_compositionCursorPos_delegate>("UnityEngine.Input::get_compositionCursorPos");
// internal delegate void set_compositionCursorPos_delegate(Vector2 value);
// internal static set_compositionCursorPos_delegate set_compositionCursorPos_iCall =
// IL2CPP.ResolveICall<set_compositionCursorPos_delegate>("UnityEngine.Input::set_compositionCursorPos");
// public static Vector2 compositionCursorPos
// {
// get => get_compositionCursorPos_iCall();
// set => set_compositionCursorPos_iCall(value);
// }
//#pragma warning restore IDE1006
//#endif
}
}
}