private void Awake() { if (instance == null) { DontDestroyOnLoad(this.gameObject); instance = this; } else { Destroy(this.gameObject); } }
//--------------------------------------------------------------- void OnMouseUp() { ScrollSnapRect scrollSnapRect = GameObject.FindObjectOfType <ScrollSnapRect>(); if (!scrollSnapRect) //in case displayed in Input Section { return; } if (scrollSnapRect.GetDragStatus() == false) { MapSelectManager mapMng = GameObject.FindObjectOfType <MapSelectManager>(); mapMng.DisplayGoButton(); PlayerPrefManager.SetCurrentLevelName(mapName); } }