Exemplo n.º 1
0
 void OnDestroy()
 {
     if (_instance == this)
     {
         _instance = null;
     }
 }
Exemplo n.º 2
0
    void Awake()
    {
        if (_instance != null)
        {
            Debug.LogError("FCDownloadManagerView: Another FCDownloadManagerView has already been created previously. " + gameObject.name + " is goning to be destroyed.");
            Destroy(this);
            return;
        }

        _instance = this;

        DontDestroyOnLoad(this);
    }