UnityAPI--UnityEngine下面的GameObject独有的静态方法

CreatePrimitive Creates a game object with a primitive mesh renderer and appropriate collider.
创建一个带有原型网格渲染器和适当的碰撞器的游戏对象。(典型工厂模式,主要用于创建cube等unity内置物体)

Find Finds a game object by /name/ and returns it.
找到并返回一个名字为name的游戏物体。

FindGameObjectsWithTag Returns a list of active GameObjects tagged /tag/. Returns empty array if no GameObject was found.
返回具体tag标签的激活的游戏对象列表,如果没有找到则为空。

FindWithTag Returns one active GameObject tagged /tag/. Returns null if no GameObject was found.
返回标记为tag的一个游戏对象,如果没有找到对象则为空。

猜你喜欢

转载自blog.csdn.net/qq_41056203/article/details/80528256
今日推荐