Пример #1
0
 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;
     }
 }
Пример #2
0
    public IEnumerator LoadNonFrameText()
    {
        if (null == this.nonFrameText)
        {
            GameObject go = AssetDataMng.Instance().LoadObject("Tutorial/TutorialNonFrameText", null, true) as GameObject;
            GameObject ui = UnityEngine.Object.Instantiate <GameObject>(go);
            yield return(null);

            ui.transform.parent        = base.transform;
            ui.transform.localPosition = Vector3.zero;
            ui.transform.localScale    = Vector3.one;
            ui.transform.localRotation = Quaternion.identity;
            this.nonFrameText          = ui.GetComponent <TutorialNonFrameText>();
            go = null;
            Resources.UnloadUnusedAssets();
        }
        yield break;
    }