mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-03 12:02:28 +08:00
DebugConsole save log on quit, some work on CacheObjects, fix missing-material issue on games without default UI Shader
This commit is contained in:
@ -34,7 +34,7 @@ namespace UnityExplorer.Tests
|
||||
}
|
||||
private static bool m_setOnlyProperty;
|
||||
|
||||
public Texture2D TestTexture = UIManager.MakeSolidTexture(Color.white, 200, 200);
|
||||
public Texture2D TestTexture;
|
||||
public static Sprite TestSprite;
|
||||
|
||||
public static int StaticProperty => 5;
|
||||
@ -48,12 +48,13 @@ namespace UnityExplorer.Tests
|
||||
public TestClass()
|
||||
{
|
||||
#if CPP
|
||||
TestTexture = UIManager.MakeSolidTexture(Color.white, 200, 200);
|
||||
TestTexture.name = "TestTexture";
|
||||
|
||||
//var r = new Rect(0, 0, TestTexture.width, TestTexture.height);
|
||||
//var v2 = Vector2.zero;
|
||||
//var v4 = Vector4.zero;
|
||||
//TestSprite = Sprite.CreateSprite_Injected(TestTexture, ref r, ref v2, 100f, 0u, SpriteMeshType.Tight, ref v4, false);
|
||||
var r = new Rect(0, 0, TestTexture.width, TestTexture.height);
|
||||
var v2 = Vector2.zero;
|
||||
var v4 = Vector4.zero;
|
||||
TestSprite = Sprite.CreateSprite_Injected(TestTexture, ref r, ref v2, 100f, 0u, SpriteMeshType.Tight, ref v4, false);
|
||||
|
||||
GameObject.DontDestroyOnLoad(TestTexture);
|
||||
GameObject.DontDestroyOnLoad(TestSprite);
|
||||
|
Reference in New Issue
Block a user