您的位置:首页 > 移动开发 > Unity3D

Unity GameObject 中文翻译

2015-08-18 16:31 621 查看
英文原文地址:http://docs.unity3d.com/ScriptReference/GameObject.html

中文原文地址:http://wiki.ceeger.com/script:unityengine:classes:gameobject:gameobject


GameObject 游戏对象

Namespace: UnityEngine Parent class: Object


Description 描述

Base class for all entities in Unity scenes.

Unity场景里面所有实体的基类。

See Also: Component.


Variables 变量

activeInHierarchyIs the GameObject active in the scene?

场景中的游戏对象是否激活?
activeSelfThe local active state of this GameObject. (Read Only)

该游戏对象的局部激活状态。(只读)
isStaticEditor only API that specifies if a game object is static.

如果一个游戏对象是静态仅在编辑器API指定。
layerThe layer the game object is in. A layer is in the range [0…31].

游戏对象所在的层,层的范围是在[0…31]之间。
tagThe tag of this game object.

这个游戏对象的标签。
transformThe Transform attached to this GameObject. (null if there is none attached).

附加于这个游戏对象上的变换。(如果没有则为空)


Constructors 构造器

GameObjectCreates a new game object, named name.

创建一个新的游戏物体,命名为name。


Functions 函数

AddComponentAdds a component class named /className/ to the game object.

添加一个名称为className的组件到游戏对象。
BroadcastMessageCalls the method named /methodName/ on every MonoBehaviour in this game object or any of its children.

对此游戏对象及其子对象的所有MonoBehaviour中调用名称为methodName的方法。
CompareTagIs this game object tagged with /tag/?

此游戏对象是否被标记为tag标签?
GetComponentReturns the component of Type /type/ if the game object has one attached, null if it doesn't.

如果这个游戏对象附件了一个类型为type的组件,则返回该组件,否则为空。
GetComponentInChildrenReturns the component of Type /type/ in the GameObject or any of its children using depth first search.

返回此游戏对象或者它的所有子对象上(深度优先)的类型为type的组件。
GetComponentInParentFinds component in the parent.

从父对象查找组件。
GetComponentsReturns all components of Type /type/ in the GameObject.

返回该游戏对象所有type类型的组件列表。
GetComponentsInChildrenReturns all components of Type /type/ in the GameObject or any of its children.

返回此游戏对象与其子对象所有type类型的组件。
GetComponentsInParentReturns all components of Type /type/ in the GameObject or any of its parents.

返回此游戏对象与其父对象所有type类型的组件。
SampleAnimationSamples an animation at a given time for any animated properties.

用于任何动画剪辑在给定的时间采样动画。
SendMessageCalls the method named /methodName/ on every MonoBehaviour in this game object.

在这个游戏物体上的所有MonoBehaviour上调用名称为methodName的方法。
SendMessageUpwardsCalls the method named /methodName/ on every MonoBehaviour in this game object and on every ancestor of the behaviour.

在这个游戏物体及其祖先物体的所有MonoBehaviour中调用名称为methodName的方法。
SetActiveActivates/Deactivates the GameObject.

激活/停用此游戏对象。


Static Functions 静态函数

CreatePrimitiveCreates a game object with a primitive mesh renderer and appropriate collider.

创建一个带有原型网格渲染器和适当的碰撞器的游戏对象。
FindFinds a game object by /name/ and returns it.

找到并返回一个名字为name的游戏物体。
FindGameObjectsWithTagReturns a list of active GameObjects tagged /tag/. Returns empty array if no GameObject was found.

返回具体tag标签的激活的游戏对象列表,如果没有找到则为空。
FindWithTagReturns one active GameObject tagged /tag/. Returns null if no GameObject was found.

返回标记为tag的一个游戏对象,如果没有找到对象则为空。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: