GameObject
- active
- AddComponent.<T>
- AddComponent
- animation
- audio
- BroadcastMessage
- camera
- collider
- CompareTag
- constantForce
- CreatePrimitive
- FindGameObjectsWithTag
- FindWithTag
- Find
- GameObject
- GetComponent.<T>
- GetComponentInChildren.<T>
- GetComponentInChildren
- GetComponents.<T>
- GetComponentsInChildren.<T>
- GetComponentsInChildren
- GetComponents
- GetComponent
- guiTexture
- guiText
- hingeJoint
- isStatic
- layer
- light
- networkView
- particleEmitter
- renderer
- rigidbody
- SampleAnimation
- SendMessageUpwards
- SendMessage
- SetActiveRecursively
- tag
- transform
GameObject 游戏物体
Inherits from Object
Base class for all entities in Unity scenes.
是Unity场景里面所有实体的基类.
参见: Component
Variables变量
-
Editor only API that specifies if a game object is static.
只有在API指定一个游戏物体是静态的时候编辑。 -
The Transform attached to this GameObject. (null if there is none attached)
附属于这个游戏物体上的变换。(如果没有则为空) -
The Rigidbody attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的刚体(只读)。(如果没有则为空) -
The Camera attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的相机(只读)。(如果没有则为空) -
The Light attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的光(只读)。(如果没有则为空) -
The Animation attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的动画(只读)。(如果没有则为空) -
The ConstantForce attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的恒定的力(只读)。(如果没有则为空) -
The Renderer attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的渲染器(只读)。(如果没有则为空) -
The AudioSource attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的音频资源(只读)。(如果没有则为空) -
The GUIText attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的GUI文本(只读)。(如果没有则为空) -
The NetworkView attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的网络视图(只读)。(如果没有则为空) -
The GUITexture attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的GUI纹理(只读)。(如果没有则为空) -
The Collider attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的碰撞器(只读)。(如果没有则为空) -
The HingeJoint attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的铰链关节(只读)。(如果没有则为空) -
The ParticleEmitter attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的粒子发射器(只读)。(如果没有则为空) -
The layer the game object is in. A layer is in the range [0...32]
游戏物体所在的层.一个层的范围是在[0...32]之间。 -
Is the GameObject active? Activates/Deactivates the GameObject.
标识游戏物体是否是活动的.使这个游戏物体活动/不活动。 -
The tag of this game object.
游戏物体的标签。
Constructors构造器
-
Creates a new game object, named name.
构造一个游戏物体,赋予名称。
Functions函数
-
Returns the component of Type type if the game object has one attached, null if it doesn't. You can access both builtin components or scripts with this function.
如果这个游戏物体包含一个类型为type的组件,则返回它.如果没有则为空.通过这个函数,你可以访问内建的组件或者脚本的组件. -
-
Returns the component with name type if the game object has one attached, null if it doesn't.
如果游戏物体有一个附加组件,则返回名为type的组件,如果没有则为空。 -
Returns the component of Type type in the GameObject or any of its children using depth first search.
返回这个游戏物体或者它的所有子物体上(深度优先)的类型为type的组件. -
-
Returns all components of Type type in the GameObject.
返回这个游戏物体上的所有类型为type的组件. -
-
Returns all components of Type type in the GameObject or any of its children.
得到游戏物体或者其所有子物体上的所有类型为type的组件. -
-
Sets the active state of this and all the game objects children to state.
设置游戏物体及其子物体的状态为state. -
Is this game object tagged with tag?
是否这个游戏物体用tag标识? -
Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour
在这个游戏物体及其祖先物体的所有MonoBehaviour中调用名称为methodName的方法. -
Calls the method named methodName on every MonoBehaviour in this game object.
在这个游戏物体上的所有MonoBehaviour上调用名称为methodName的方法. -
Calls the method named methodName on every MonoBehaviour in this game object or any of its children.
在这个游戏物体及其子物体的所有MonoBehaviour中调用名称为methodName的方法. -
Adds a component class named className to the game object.
添加一个名称为className的组件到游戏物体. -
-
Samples an animation at a given time for any animated properties.
为所有动画属性在某个给定时间为一个动画采样.
Class Functions类函数
-
Creates a game object with a primitive mesh renderer and appropriate collider.
创建一个带有基本网格渲染器和相应碰撞器的游戏物体。 -
Returns one active GameObject tagged tag. Returns null if no GameObject was found.
返回一个用tag做标识的活动的游戏物体.如果没有找到则为空. -
Returns a list of active GameObjects tagged tag. Returns null if no GameObject was found.
返回一个用tag做标识的活动的游戏物体的列表.如果没有找到则为空. -
Finds a game object by name and returns it.
找到并返回一个名字为name的游戏物体.
Inherited members继承成员
Inherited Variables继承变量
-
The name of the object. //物体的名字
-
Should the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions继承函数
-
Returns the instance id of the object.
返回物体的实例ID -
Returns the name of the game object.
返回游戏物体的名称。
Inherited Class Functions继承类函数
-
Does the object exist?
物体是否存在? -
Clones the object original and returns the clone.
克隆原始物体,并返回克隆的物体 -
-
Removes a gameobject, component or asset.
删除一个游戏物体、组件或资源 -
Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。 -
Returns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表 -
Returns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。 -
Compares if two objects refer to the same
比较如果两个物体相同 -
Compares if two objects refer to a different object
比较如果两个物体不同 -
Makes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。
最后修改:2011年5月19日 Thursday 22:12