摘要:
扩展Scene视图的几种方式 1) 注册SceneView.duringSceneGui委托(Unity2018及之前版本是SceneView.onSceneGUIDelegate) #if UNITY_EDITOR using UnityEditor; public class TestScene 阅读全文
posted @ 2023-10-19 23:06
yanghui01
阅读(388)
评论(0)
推荐(0)
摘要:
var ray = Camera.ScreenPointToRay(screenPos); 1) screenPos需要是左下角为(0, 0), 单位为像素的屏幕坐标。 2) 得到的射线的开始为屏幕坐标在相机near平面上的点, 指向屏幕坐标在far平面上的点 在游戏代码中使用 using Unit 阅读全文
posted @ 2023-10-19 00:35
yanghui01
阅读(456)
评论(0)
推荐(0)

浙公网安备 33010602011771号