static BackMainScene() { GameObject prefab = Resources.Load(path) as GameObject; GameObject go = GameObject.Instantiate(prefab); DontDestroyOnLoad(go); instance = go.AddComponent<BackMainScene>(); }
static BackMainScene() { GameObject prefab = Resources.Load(path) as GameObject; GameObject go = GameObject.Instantiate(prefab); DontDestroyOnLoad(go); instance = go.AddComponent <BackMainScene>(); }