游戏蛮牛Unity 用户文档
1.0
首页
-
资讯
-
Unity教程
-
Cocos2d教程
-
游戏
-
招聘
-
专题控
-
博客
-
手册
-
论坛
Unity 脚本手册
用户手册
组件手册
脚本手册
用户手册
组件手册
脚本手册
GUIText 界面文本
Inherits from
GUIElement
A text string displayed in a GUI.
用在GUI显示的一个文本字符串。
Variables
变量
text
The text to display.
用于显示的文本。
material
The Material to use for rendering.
用于渲染的材质。
pixelOffset
The pixel offset of the text.
文本的像素偏移。
font
The font used for the text.
用于文本的字体。
alignment
The alignment of the text.
文本的对齐方式。
anchor
The anchor of the text.
文本的锚点。
lineSpacing
The line spacing multiplier.
行间距倍数。
tabSize
The tab width multiplier.
制表符宽度倍数。
fontSize
The font size to use (for dynamic fonts)
使用的字体大小(用于动态字体)
fontStyle
The font style to use (for dynamic fonts)
Inherited members
继承成员
Inherited Variables
继承变量
enabled
Enabled Behaviours are Updated, disabled Behaviours are not.
启用行为被更新,禁用行为不更新。
transform
The
Transform
attached to this
GameObject
(null if there is none attached).
Transform
附加到
GameObject
(游戏物体)(如无附加则为空)。
rigidbody
The
Rigidbody
attached to this
GameObject
(null if there is none attached).
Rigidbody
附加到
GameObject
(游戏物体)(如无附加则为空)。
camera
The
Camera
attached to this
GameObject
(null if there is none attached).
Camera
附加到
GameObject
(游戏物体)(如无附加则为空)。
light
The
Light
attached to this
GameObject
(null if there is none attached).
Light
附加到
GameObject
(游戏物体)(如无附加则为空)。
animation
The
Animation
attached to this
GameObject
(null if there is none attached).
Animation
附加到
GameObject
(游戏物体)(如无附加则为空)。
constantForce
The
ConstantForce
attached to this
GameObject
(null if there is none attached).
ConstantForce
附加到
GameObject
(游戏物体)(如无附加则为空)。
renderer
The
Renderer
attached to this
GameObject
(null if there is none attached).
Renderer
附加到
GameObject
(游戏物体)(如无附加则为空)。
audio
The
AudioSource
attached to this
GameObject
(null if there is none attached).
AudioSource
附加到
GameObject
(游戏物体)(如无附加则为空)。
guiText
The
GUIText
attached to this
GameObject
(null if there is none attached).
GUIText
附加到
GameObject
(游戏物体)(如无附加则为空)。
networkView
The
NetworkView
attached to this
GameObject
(Read Only). (null if there is none attached)
NetworkView
附加到
GameObject
(游戏物体)(只读)(如无附加则为空)。
guiTexture
The
GUITexture
attached to this
GameObject
(Read Only). (null if there is none attached)
GUITexture
附加到
GameObject
(游戏物体)(只读)(如无附加则为空)。
collider
The
Collider
attached to this
GameObject
(null if there is none attached).
Collider
附加到
GameObject
(游戏物体)(如无附加则为空)。
hingeJoint
The
HingeJoint
attached to this
GameObject
(null if there is none attached).
HingeJoint
附加到
GameObject
(游戏物体)(如无附加则为空)。
particleEmitter
The
ParticleEmitter
attached to this
GameObject
(null if there is none attached).
ParticleEmitter
附加到
GameObject
(游戏物体)(如无附加则为空)。
gameObject
The game object this component is attached to. A component is always attached to a game object.
组件附加的游戏物体。一个组件总是被附加到一个游戏物体。
tag
The tag of this game object.
游戏物体的标签。
name
The name of the object. //物体的名字
hideFlags
Should the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions
继承函数
HitTest
Is a point on screen inside the element.
屏幕上的点是否在元素里面?
GetScreenRect
Returns bounding rectangle of GUIElement in screen coordinates.
返回在屏幕坐标
GUIElement
的包围矩形。
GetComponent
Returns the component of Type type if the game object has one attached, null if it doesn't.
如果游戏物体有一个附加,则返回Type类型的组件,如果没有则为null。
GetComponent.<T>
GetComponent
Returns the component with name type if the game object has one attached, null if it doesn't.
如果游戏物体有一个附加,则返回名字类型组件,如果没有则为null。
GetComponentInChildren
Returns the component of Type type in the
GameObject
or any of its children using depth first search.
返回Type类型组件,在
GameObject
或它的任何子物体使用深度优先搜索,仅返回激活的组件。
GetComponentInChildren.<T>
GetComponentsInChildren
Returns all components of Type type in the
GameObject
or any of its children.
在
GameObject
或任何它的子物体,返回全部Type类型组件
GetComponentsInChildren.<T>
GetComponents
Returns all components of Type type in the
GameObject
.
在游戏物体返回全部Type类型组件。
GetComponents.<T>
CompareTag
Is this game object tagged tag?
游戏物体有被标记标签么?
SendMessageUpwards
Calls the method named methodName on every
MonoBehaviour
in this game object and on every ancestor of the behaviour
在游戏物体每一个
MonoBehaviour
和每一个behaviour的祖先上调用名为methodName的方法。
SendMessage
Calls the method named methodName on every
MonoBehaviour
in this game object.
在游戏物体每一个
MonoBehaviour
上调用名为methodName的方法。
BroadcastMessage
Calls the method named methodName on every
MonoBehaviour
in this game object or any of its children.
在游戏物体每一个
MonoBehaviour
和它的全部子物体上调用名为methodName的方法。
GetInstanceID
Returns the instance id of the object.
返回物体的实例ID
ToString
Returns the name of the game object.
返回游戏物体的名称。
Inherited Class Functions
继承类函数
Destroy
Removes a gameobject, component or asset.
删除一个游戏物体、组件或资源
DestroyImmediate
Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。
DontDestroyOnLoad
Makes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。
FindObjectOfType
Returns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。
FindObjectsOfType
Returns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表
Instantiate
Clones the object original and returns the clone.
克隆原始物体,并返回克隆的物体
Page last updated: 2011-1-24