SHA256
Add Auto UI Initialization
This commit is contained in:
3 files changed
+34
-14
No files matched your search
+3
-4
@@ -19,8 +19,6 @@ internal class RenderMod : MelonMod
|
||||
{
|
||||
public static AssetBundle FontBundle = null!;
|
||||
// ReSharper disable once MemberCanBePrivate.Global
|
||||
public static AssetBundle SceneBundle = null!;
|
||||
// ReSharper disable once MemberCanBePrivate.Global
|
||||
public static AssetBundle ShaderBundle = null!;
|
||||
public static ComputeShader ColorConversionShader = null!;
|
||||
public static bool IsFeatureDisabled = false;
|
||||
@@ -33,19 +31,20 @@ internal class RenderMod : MelonMod
|
||||
|
||||
var renderManagerObj = new GameObject("Render Manager");
|
||||
var updateHookerObj = new GameObject("Update Hooker");
|
||||
var uiManagerObj = new GameObject("Renderer UI Manager");
|
||||
Object.DontDestroyOnLoad(renderManagerObj);
|
||||
Object.DontDestroyOnLoad(updateHookerObj);
|
||||
Object.DontDestroyOnLoad(uiManagerObj);
|
||||
|
||||
renderManagerObj.AddComponent<RenderManager>();
|
||||
updateHookerObj.AddComponent<FirstUpdateHook>();
|
||||
uiManagerObj.AddComponent<UI.RendererUIManager>();
|
||||
LoadBundles();
|
||||
}
|
||||
|
||||
private static void LoadBundles()
|
||||
{
|
||||
FontBundle = BundleLoader.GetBundle("fonts");
|
||||
SceneBundle = BundleLoader.GetBundle("scenes");
|
||||
SceneBundle.GetAllScenePaths();
|
||||
try
|
||||
{
|
||||
ShaderBundle = BundleLoader.GetBundle("shaders");
|
||||
|
||||
Reference in new issue
Block a user