public static void Init() { if (!GameMain.IsPlaying) { return; } lock (mLock) { if (isInit == true) { return; } var go = new GameObject("[MY_COROUTINE]"); m = go.AddComponent <MyCoroutineMono>(); isInit = true; DontDestroyOnLoad(go); } }
public static void Init(int maxFrameIntervalMs) { MAX_FRAME_INTERVAL_MS = maxFrameIntervalMs; MyCoroutineMono.Init(); }