位置: unity获取组件的方法 - 标签
Unity3D 获取控件四个角在屏幕上的坐标(unity获取组件的方法)
简述:Vector3[]corners=newVector3[4];gameObject.GetComponent<RectTransform>().GetWorldCorners(corners);foreach(varitemincorners){Debug.Log(item);}出来的坐标的顺序是左下、左上、右上、右
发布时间:2024/02/27
鄂ICP备2023003026号