void Awake() { // Destroy this game object on other platforms different from iOS if (Application.platform != RuntimePlatform.IPhonePlayer && !Application.isEditor) { Destroy(this.gameObject); return; } if (instance != null) { Debug.LogWarning("[IPodPlayerEventsHandler] Multiple instances of this singleton found! In scene: " + Application.loadedLevelName); Destroy(gameObject); return; } instance = this; Object.DontDestroyOnLoad(gameObject); }