lua代码设置unity对象的基础属性

设置对象的父节点:

  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)

上一篇:作为互联网流量入口,CDN日志大数据你该怎么玩?


下一篇:浅析 PHP 中的 Generator