void DestroyPlatform() { if (registry.registryDelegate == m_platform) { registry.registryDelegate = null; } s_instance = null; }
void InitInstance() { if (s_instance == null) { if (InitPlatform(m_capacity, m_trim)) { s_instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } } else if (s_instance != this) { Destroy(gameObject); } }