|
@@ -1385,8 +1385,10 @@ public class Player : Regist , IPointerClickHandler
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ private List<UnityUGUIDisplay> uguiDisplays;
|
|
public void DisplayInUI(float scale)
|
|
public void DisplayInUI(float scale)
|
|
{
|
|
{
|
|
|
|
+ uguiDisplays = new List<UnityUGUIDisplay>();
|
|
UGUIScale = scale;
|
|
UGUIScale = scale;
|
|
scale *= ResourceManager.Get<Canvas>(CanvasLabel.Canvas).scaleFactor;
|
|
scale *= ResourceManager.Get<Canvas>(CanvasLabel.Canvas).scaleFactor;
|
|
MeshFilter[] meshFilters = UAC.GetComponentsInChildren<MeshFilter>(true);
|
|
MeshFilter[] meshFilters = UAC.GetComponentsInChildren<MeshFilter>(true);
|
|
@@ -1397,8 +1399,9 @@ public class Player : Regist , IPointerClickHandler
|
|
MeshRenderer meshRenderer = meshRenderers[i];
|
|
MeshRenderer meshRenderer = meshRenderers[i];
|
|
UnityUGUIDisplay unityUGUIDisplay = meshRenderer.GetComponent<UnityUGUIDisplay>();
|
|
UnityUGUIDisplay unityUGUIDisplay = meshRenderer.GetComponent<UnityUGUIDisplay>();
|
|
if (unityUGUIDisplay == null) unityUGUIDisplay = meshRenderer.AddComponent<UnityUGUIDisplay>();
|
|
if (unityUGUIDisplay == null) unityUGUIDisplay = meshRenderer.AddComponent<UnityUGUIDisplay>();
|
|
- unityUGUIDisplay.Enable(meshFilter, meshRenderer);
|
|
|
|
|
|
+ unityUGUIDisplay.Enable(UAC.transform, meshRenderer.transform, meshFilter, meshRenderer);
|
|
unityUGUIDisplay.raycastTarget = false;
|
|
unityUGUIDisplay.raycastTarget = false;
|
|
|
|
+ uguiDisplays.Add(unityUGUIDisplay);
|
|
meshRenderer.enabled = false;
|
|
meshRenderer.enabled = false;
|
|
UAC.transform.localScale = new Vector3(scale, scale, 1);
|
|
UAC.transform.localScale = new Vector3(scale, scale, 1);
|
|
SetAllCollider(false);
|
|
SetAllCollider(false);
|
|
@@ -1613,24 +1616,33 @@ public class Player : Regist , IPointerClickHandler
|
|
|
|
|
|
if (IsDisplayInUGUI)
|
|
if (IsDisplayInUGUI)
|
|
{
|
|
{
|
|
- SetSlotAsFirstChild(TopSlot);
|
|
|
|
- SetSlotAsFirstChild(DressSlot);
|
|
|
|
- SetSlotAsFirstChild(LeftShortSleeveSlot);
|
|
|
|
- SetSlotAsFirstChild(RightShortSleeveSlot);
|
|
|
|
- LeftLongSleeveUAC.transform.SetAsFirstSibling();
|
|
|
|
- RightLongSleeveUAC.transform.SetAsFirstSibling();
|
|
|
|
- SetSlotAsFirstChild(EyeSlot);
|
|
|
|
- SetSlotAsFirstChild(MouseSlot);
|
|
|
|
- SetSlotAsFirstChild(LeftShoeSlot);
|
|
|
|
- SetSlotAsFirstChild(RightShoeSlot);
|
|
|
|
- SetSlotAsFirstChild(HeadWearSlot);
|
|
|
|
- SetSlotAsFirstChild(LeftHandSlot);
|
|
|
|
- SetSlotAsFirstChild(RightHandSlot);
|
|
|
|
- SetSlotAsFirstChild(HeadSlot);
|
|
|
|
- SetSlotAsFirstChild(LeftLegSlot);
|
|
|
|
- SetSlotAsFirstChild(RightLegSlot);
|
|
|
|
- SetSlotAsFirstChild(NeckSlot);
|
|
|
|
- SetSlotAsFirstChild(WingSlot);
|
|
|
|
|
|
+ uguiDisplays.MySort((display1, display0) =>
|
|
|
|
+ display1.transform.position.z < display0.transform.position.z);
|
|
|
|
+
|
|
|
|
+ foreach (var display in uguiDisplays)
|
|
|
|
+ {
|
|
|
|
+ //Debug.Log(display.dbGraphic.copyTrans.name);
|
|
|
|
+ display.dbGraphic.transform.SetAsLastSibling();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //SetSlotAsFirstChild(TopSlot);
|
|
|
|
+ //SetSlotAsFirstChild(DressSlot);
|
|
|
|
+ //SetSlotAsFirstChild(LeftShortSleeveSlot);
|
|
|
|
+ //SetSlotAsFirstChild(RightShortSleeveSlot);
|
|
|
|
+ //LeftLongSleeveUAC.transform.SetAsFirstSibling();
|
|
|
|
+ //RightLongSleeveUAC.transform.SetAsFirstSibling();
|
|
|
|
+ //SetSlotAsFirstChild(EyeSlot);
|
|
|
|
+ //SetSlotAsFirstChild(MouseSlot);
|
|
|
|
+ //SetSlotAsFirstChild(LeftShoeSlot);
|
|
|
|
+ //SetSlotAsFirstChild(RightShoeSlot);
|
|
|
|
+ //SetSlotAsFirstChild(HeadWearSlot);
|
|
|
|
+ //SetSlotAsFirstChild(LeftHandSlot);
|
|
|
|
+ //SetSlotAsFirstChild(RightHandSlot);
|
|
|
|
+ //SetSlotAsFirstChild(HeadSlot);
|
|
|
|
+ //SetSlotAsFirstChild(LeftLegSlot);
|
|
|
|
+ //SetSlotAsFirstChild(RightLegSlot);
|
|
|
|
+ //SetSlotAsFirstChild(NeckSlot);
|
|
|
|
+ //SetSlotAsFirstChild(WingSlot);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|