Inheritance: MonoBehaviour
Esempio n. 1
0
 static BackMainScene()
 {
     GameObject prefab = Resources.Load(path) as GameObject;
     GameObject go = GameObject.Instantiate(prefab);
     DontDestroyOnLoad(go);
     instance = go.AddComponent<BackMainScene>();
 }
Esempio n. 2
0
    static BackMainScene()
    {
        GameObject prefab = Resources.Load(path) as GameObject;
        GameObject go     = GameObject.Instantiate(prefab);

        DontDestroyOnLoad(go);
        instance = go.AddComponent <BackMainScene>();
    }