如上图,使用这两个条件时,注意区分关键不同,can see object 只能看一个物体,因为源码里用的是GameObject.FindGameObjectWithTag(),而Within Distance用的是GameObject.FindGameObjectsWithTag(),返回的是数组。因此使用时,注意一下。
Behavior Designer 中CanSee Object与Within Distance的使用区别
最新推荐文章于 2022-08-01 21:05:00 发布
如上图,使用这两个条件时,注意区分关键不同,can see object 只能看一个物体,因为源码里用的是GameObject.FindGameObjectWithTag(),而Within Distance用的是GameObject.FindGameObjectsWithTag(),返回的是数组。因此使用时,注意一下。