private void OnDestroy() { UnityEngine.Object.Destroy(this.messageWindow); this.messageWindow = null; UnityEngine.Object.Destroy(this.imageWindow); this.imageWindow = null; UnityEngine.Object.Destroy(this.nonFrameText); this.nonFrameText = null; UnityEngine.Object.Destroy(this.thumbnail); this.thumbnail = null; UnityEngine.Object.Destroy(this.selectItem); this.selectItem = null; if (this.CommonBackground != null) { UnityEngine.Object.Destroy(this.CommonBackground); this.CommonBackground = null; } }
public IEnumerator LoadThumbnail() { if (null == this.thumbnail) { GameObject go = AssetDataMng.Instance().LoadObject("Tutorial/TutorialThumbnail", null, true) as GameObject; GameObject img = UnityEngine.Object.Instantiate <GameObject>(go); yield return(null); img.transform.parent = base.transform; img.transform.localScale = Vector3.one; img.transform.localRotation = Quaternion.identity; img.transform.localPosition = Vector3.zero; this.thumbnail = img.GetComponent <TutorialThumbnail>(); go = null; Resources.UnloadUnusedAssets(); } yield break; }
public void SetThumbnail(TutorialThumbnail thumbnail) { this.thumbnail = thumbnail; }