瀏覽代碼

Initialize on activation

Rather than initialize when at a specific scene, initialize when
MeidoPhotoStudio is activated
habeebweeb 4 年之前
父節點
當前提交
ce4caac13d
共有 1 個文件被更改,包括 2 次插入7 次删除
  1. 2 7
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/MeidoPhotoStudio.cs

+ 2 - 7
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/MeidoPhotoStudio.cs

@@ -1,5 +1,4 @@
-using System;
-using System.Collections;
+using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.SceneManagement;
@@ -126,11 +125,6 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         private void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode)
         {
             currentScene = (Constants.Scene)scene.buildIndex;
-
-            if (currentScene == Constants.Scene.Daily)
-            {
-                if (!initialized) Initialize();
-            }
         }
 
         private void Initialize()
@@ -163,6 +157,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
         private void Activate()
         {
+            if (!initialized) Initialize();
             uiActive = true;
             isActive = true;