|
@@ -63,9 +63,6 @@ namespace GFGGame
|
|
|
_animObject = null;
|
|
|
}
|
|
|
|
|
|
- _dressUpObj?.Dispose();
|
|
|
- _dressUpObj = null;
|
|
|
-
|
|
|
_wordTextField = null;
|
|
|
_arrow = null;
|
|
|
_isShowLetters = false;
|
|
@@ -108,11 +105,6 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_btnSpeedUp.onClick.Add(OnClickBtnSpeedUp);
|
|
|
_ui.m_btnAutoPlay.onClick.Add(OnClickBtnAutoPlay);
|
|
|
-
|
|
|
- if (_dressUpObj == null)
|
|
|
- {
|
|
|
- _dressUpObj = new DressUpObj();
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
protected override void OnShown()
|
|
@@ -128,7 +120,11 @@ namespace GFGGame
|
|
|
if (_sceneObject == null)
|
|
|
{
|
|
|
_sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneStoryDialog"));
|
|
|
+ }
|
|
|
|
|
|
+ if (_dressUpObj == null)
|
|
|
+ {
|
|
|
+ _dressUpObj = new DressUpObj();
|
|
|
}
|
|
|
|
|
|
CreateHeadImg();
|
|
@@ -1026,7 +1022,10 @@ namespace GFGGame
|
|
|
|
|
|
private void DestroyHeadImg()
|
|
|
{
|
|
|
- _dressUpSceneObj.transform.Find("Camera").GetComponent<Camera>().targetTexture = null;
|
|
|
+ Camera camera = _dressUpSceneObj.transform.Find("Camera").GetComponent<Camera>();
|
|
|
+ camera.targetTexture = null;
|
|
|
+ Transform parent = _dressUpSceneObj.transform.Find("Role");
|
|
|
+ ChangeLayer(parent, 0);
|
|
|
|
|
|
// 回收RawImage
|
|
|
if (_selfHeadImgObj != null)
|
|
@@ -1041,6 +1040,10 @@ namespace GFGGame
|
|
|
PrefabManager.Instance.Restore(_dressUpSceneObj);
|
|
|
_dressUpSceneObj = null;
|
|
|
}
|
|
|
+
|
|
|
+ // 回收人物
|
|
|
+ _dressUpObj?.Dispose();
|
|
|
+ _dressUpObj = null;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|