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

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