public static PlayishManager getInstance() { if (currentInstance == null) { var playishManager = new GameObject("PlayishManager"); currentInstance = playishManager.AddComponent <PlayishManager> (); } return(currentInstance); }
// ---- MARK: Setup private void Awake() { if (currentInstance == null) { currentInstance = this; } else if (currentInstance != null && this.GetHashCode() != currentInstance.GetHashCode()) { DestroyImmediate(transform.gameObject); return; } DeviceManager.getInstance().clearDevices(); }