数据同步
This commit is contained in:
parent
cf14eb640c
commit
e8b8098372
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -69,7 +69,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
ClickEvent clickEvent = item.GetComponent<ClickEvent>();
|
||||
BoxCollider boxCollider = item.GetComponent<BoxCollider>();
|
||||
//CabinetInfor cabinetInfor = item.GetComponent<CabinetInfor>();
|
||||
|
||||
Transform U = item.Find("U位");
|
||||
|
||||
if (item.gameObject.activeSelf)
|
||||
{
|
||||
|
@ -79,11 +79,11 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
item.gameObject.AddComponent<ClickEvent>();
|
||||
}
|
||||
|
||||
Renderer renderer = null;
|
||||
if (!boxCollider)
|
||||
{
|
||||
try
|
||||
{
|
||||
Renderer renderer = null;
|
||||
if (item.childCount != 0)
|
||||
renderer = item.Find(item.name).GetComponent<Renderer>();
|
||||
else
|
||||
|
@ -115,7 +115,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
{
|
||||
Debug.Log(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//if (!cabinetInfor)
|
||||
|
@ -127,6 +127,18 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
//{
|
||||
// cabinetInfor.cabinet.name = item.name;
|
||||
//}
|
||||
|
||||
if (!U)
|
||||
{
|
||||
var go = GameObject.Instantiate(Resources.Load<Transform>("机柜/U位"));
|
||||
go.name = "U位";
|
||||
|
||||
var bounds = renderer.bounds;
|
||||
Vector3 bottomPosition = bounds.min;
|
||||
|
||||
go.position = bottomPosition + new Vector3(0, 0, 0.063f);
|
||||
go.SetParent(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue