mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-15 07:56:41 +08:00
Add proper support for InputSystem
This commit is contained in:
@ -31,8 +31,8 @@ namespace UnityExplorer.UI.InteractiveValues
|
||||
// arbitrarily check some types, fastest methods first.
|
||||
if (type == typeof(bool))
|
||||
return typeof(InteractiveBool);
|
||||
// if type is primitive then it must be a number if its not a bool
|
||||
else if (type.IsPrimitive)
|
||||
// if type is primitive then it must be a number if its not a bool. Also check for decimal.
|
||||
else if (type.IsPrimitive || type == typeof(decimal))
|
||||
return typeof(InteractiveNumber);
|
||||
// check for strings
|
||||
else if (type == typeof(string))
|
||||
|
@ -140,6 +140,8 @@ namespace UnityExplorer.UI
|
||||
ExplorerCore.Log("This game does not ship with the 'UI/Default' shader, using manual Default Shader...");
|
||||
Graphic.defaultGraphicMaterial.shader = BackupShader;
|
||||
}
|
||||
else
|
||||
BackupShader = Graphic.defaultGraphicMaterial.shader;
|
||||
|
||||
ConsoleFont = bundle.LoadAsset<Font>("CONSOLA");
|
||||
|
||||
@ -148,9 +150,11 @@ namespace UnityExplorer.UI
|
||||
|
||||
private static AssetBundle LoadExplorerUi(string id)
|
||||
{
|
||||
var data = ReadFully(typeof(ExplorerCore)
|
||||
var stream = typeof(ExplorerCore)
|
||||
.Assembly
|
||||
.GetManifestResourceStream($"UnityExplorer.Resources.explorerui.{id}.bundle"));
|
||||
.GetManifestResourceStream($"UnityExplorer.Resources.explorerui.{id}.bundle");
|
||||
|
||||
var data = ReadFully(stream);
|
||||
|
||||
return AssetBundle.LoadFromMemory(data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user