Private _anchorPrivate _anchorProtected _childrenProtected _componentsProtected _globalProtected _globalPrivate _layoutProtected _parentPrivate _pivotPrivate Readonly _positionPrivate _rectPrivate _rotationPrivate Readonly _scalePrivate _size自身以及子对象是否支持鼠标拾取
名称
Static _register组件列表
是否全局可见。
子组件个数
旋转
是否可见。
Protected _invalidatePrivate _onPrivate _onPrivate _onProtected _setProtected _update添加一个类型为type的组件到游戏对象。
被添加的组件。
Optional params: gPartial<ComponentMap[K]>Protected add返回游戏对象附加的一个指定类型的组件,如果没有,则返回 null。
使用 Entity.GetComponent 将返回找到的第一个组件。如果您希望有多个相同类型的组件,请改用 Entity.GetComponents,并循环通过返回的组件测试某些唯一属性。
要检索的组件。
要检索的组件类型。
使用深度优先搜索返回 Node 或其任何子项中的 Type 组件。
匹配类型的组件(如果找到)。
是否包含不活跃组件。
检索Container或其任何父项type中的 Type 组件。
此方法向上递归,直到找到具有匹配组件的 Container。仅匹配活动游戏对象上的组件。
如果找到与类型匹配的组件,则返回一个组件。否则返回 null。
是否包含不活跃组件。
返回Entity中指定类型的所有组件。
Entity中指定类型的所有组件。
Optional component: K要检索的组件。
列出接收找到的组件。
使用深度优先搜索返回 Node 或其任何子子项中 Type 的所有组件。递归工作。
Unity 在子游戏对象上递归搜索组件。这意味着它还包括目标 Node 的所有子 Container,以及所有后续子 Container。
所有找到的组件。
Optional component: K要检索的组件类型。
非活动游戏对象上的组件是否应该包含在搜索结果中?
列出接收找到的组件。
返回Container或其任何父级中指定的所有组件。
Container或其任何父级中指定的所有组件。
Optional component: K要检索的组件类型。
非活动组件是否应该包含在搜索结果中?
列出找到的组件。
把事件分享到每个组件上。
移除指定类型组件
组件类型
Activates/Deactivates the Node, depending on the given true or false value.
A Node may be inactive because a parent is not active. In that case, calling SetActive will not activate it, but only set the local state of the Node, which you can check using Node.activeSelf. Unity can then use this state when all parents become active.
Activate or deactivate the object, where true activates the Node and false deactivates the Node.
Static create创建指定类型的游戏对象。
Static register注册原始游戏对象,被注册后可以使用 Node2D.registerPrimitive 进行创建。
Generated using TypeDoc
2D结点
用于构建2D场景树结构,处理2D对象的位移旋转缩放等空间数据。