void OnDestroy() { if (_instance == this) { _instance = null; } }
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); }