设置对象的父节点:
wall.transform:SetParent(GameObject.Find("Walls").transform)
设置颜色:
wall:GetComponent("Image").color = UnityEngine.Color(111/255, 89/255, 89/255, 1)
设置大小:
wall.transform.localScale = UnityEngine.Vector3(0.2, 0.2, 1)
设置位置:
wall.transform.localPosition = UnityEngine.Vector3(pos.posX, pos.posY, pos.posZ)
时间: 2024-10-11 13:49:02