guodong 1 year ago
parent
commit
d46f5a3899

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Assets/PrefabManager.cs

@@ -17,7 +17,8 @@ namespace GFGGame
         private void Awake()
         {
             preDrawRoot = new GameObject("PredrawToot");
-            preDrawRoot.transform.position = new Vector3(100, 0, 0);
+            preDrawRoot.transform.position = new Vector3(0, 0, 0);
+            preDrawRoot.transform.localScale = Vector3.zero;
         }
 
         public void Init()

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Data/PhotographSceneManager.cs

@@ -102,8 +102,9 @@ namespace GFGGame
         {
 
             PhotographDataManager.Instance.dressUpObj.setSceneObj(sceneObj, false, false, parentObj, false, 
-                () => { SetRoleBoxCollider(parentObj); });
+                () => {  });
             PhotographDataManager.Instance.dressUpObj.PutOnDressUpData(MyDressUpHelper.dressUpObj.DressUpDataClone());
+            SetRoleBoxCollider(parentObj);
         }
 
         private void SetRoleBoxCollider(GameObject parentObj)

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Data/PhotographUtil.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Threading.Tasks;
 using FairyGUI;
 using Live2D.Cubism.Rendering;
 using UI.DressUp;
@@ -39,8 +40,9 @@ namespace GFGGame
 
 
         //设置物体中心点
-        public void SetGameObjectCenter(GameObject parentObj)
+        public async void SetGameObjectCenter(GameObject parentObj)
         {
+            await Task.Delay(5);
             Transform parent = parentObj.transform;  // 2.选中技算
             Vector3 postion = parent.position;
             Quaternion rotation = parent.rotation;