mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-24 01:12:41 +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:
@ -32,7 +32,11 @@ namespace UnityExplorer.UI
|
||||
var bundle = AssetBundle.LoadFromFile(bundlePath);
|
||||
|
||||
// Fix for games which don't ship with 'UI/Default' shader.
|
||||
Graphic.defaultGraphicMaterial.shader = bundle.LoadAsset<Shader>("DefaultUI");
|
||||
if (Graphic.defaultGraphicMaterial.shader?.name != "UI/Default")
|
||||
{
|
||||
ExplorerCore.Log("This game does not ship with the 'UI/Default' shader, using manual Default Shader...");
|
||||
Graphic.defaultGraphicMaterial.shader = bundle.LoadAsset<Shader>("DefaultUI");
|
||||
}
|
||||
|
||||
ResizeCursor = bundle.LoadAsset<Sprite>("cursor");
|
||||
|
||||
|
Reference in New Issue
Block a user