static SceneManager() { Application.targetFrameRate = 60; Object sceneTransition = Resources.Load("SceneTransition"); m_SceneTransition = ((GameObject)GameObject.Instantiate(sceneTransition)).GetComponent<SceneTransition>(); GameObject sceneSupporter = new GameObject("SceneManagerSupporter"); m_SceneSupporter = sceneSupporter.AddComponent<SceneManagerSupporter>(); ShieldColor = new Color(0.235f, 0.235f, 0.235f, 0.5f); SceneFadeTime = 0.5f; SceneAnimationTime = 0.283f; }
void FindTarget() { #if UNITY_EDITOR if (!Application.isPlaying) { if (target == null) { target = FindObjectOfType<SceneTransition>(); } if (image == null) { image = GetComponent<Image>(); } } #endif }