private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); return; } }
public void OnButtonClick() { if (string.IsNullOrEmpty(link)) { if (!GalleryController.isNullInstance) { GalleryController.GetInstance.ExitFromGallery(); } else if (!GallryViewCotroller.isNullInstance) { GallryViewCotroller.GetInstance.ExitFromGallery(); } Destroy(this.gameObject); } else { FullViewImageScreen.SetElement(this); FullViewImageScreen.ShowFullViewImageScreen(SpriteLoader.GetSpriteFromFile(Link), link); } }