在Unity中经常用到本地坐标(相对坐标)与世界坐标的转换,比如在开发某些UI组件时,本文整理了相关转换接口 测试层级如下图: 测试代码如下: using System.Collections; using System.Collections.Generic; using UnityEngine; public class JCTest_Trans : MonoBehaviour { public Transform mTestPoint; void Start() { //本地坐标(相对于Point_Paren…