private void CreateLoadingTop() { if (m_Loading == null) { if (m_LoadingBack != null) { m_Loading = Instantiate(m_LoadingBack) as GameObject; m_Loading.name = m_LoadingBack.name.Replace("Back", "Top"); SSRoot root = m_Loading.GetComponent <SSRoot> (); if (root == null) { Debug.LogWarning("You must to attach SSRoot to the root object of loading scene!"); } else { root.PreventLoadCallBack = true; } SetPosition(m_Loading, SHIELD_TOP_INDEX); SetCameras(m_Loading, SHIELD_TOP_INDEX); m_Loading.SetActive(false); } } }
void CreateRoot() { if (Root == null && !Application.isPlaying) { Transform root = gameObject.transform; while (root.parent != null) { root = root.parent; } SSRoot ssRoot = root.GetComponent <SSRoot>(); if (ssRoot == null) { root.gameObject.AddComponent <SSRoot>(); } Root = ssRoot; } }
void CreateRoot() { if (Root == null && !Application.isPlaying) { Transform root = gameObject.transform; while (root.parent != null) { root = root.parent; } SSRoot ssRoot = root.GetComponent<SSRoot>(); if (ssRoot == null) { root.gameObject.AddComponent<SSRoot>(); } Root = ssRoot; } }