TextMesh 文本网格
Inherits from Component
A script interface for the text mesh component.
用于文本网格组件的一个脚本接口。
Variables变量
- textThe text that is displayed.
用于显示的文本。 - fontThe Font used.
文本使用的字体。 - fontSizeThe font size to use (for dynamic fonts)
文本的字体的大小(用于动态字体) - fontStyleThe font style to use (for dynamic fonts)
字体的样式(用于动态字体) - offsetZHow far should the text be offset from the transform.position.z when drawing
在绘制时从transform.position.z文本偏移了多少。 - alignmentHow lines of text are aligned (Left, Right, Center)
文本行是怎样对齐的(Left, Right, Center)。 - anchorWhich point of the text shares the position of the Transform
文本上的哪个点共享此变换的位置。 - characterSizeThe size of each character (This scales the whole text)
每个字符的大小(这个是整个文本的比例)。 - lineSpacingHow much space will be in-between lines of text
在文本行之间的多少空距。 - tabSizeHow much space will be inserted for a tab ' ' character. This is a multiplum of the 'spacebar' character offset
替代tab‘ ’字符多少空格。这是一个多少空格的字符偏移。
Inherited members继承成员Inherited Variables继承变量
- transformThe Transform attached to this GameObject (null if there is none attached).
Transform附加到GameObject(游戏物体)(如无附加则为空)。 - rigidbodyThe Rigidbody attached to this GameObject (null if there is none attached).
Rigidbody附加到GameObject(游戏物体)(如无附加则为空)。 - cameraThe Camera attached to this GameObject (null if there is none attached).
Camera附加到GameObject(游戏物体)(如无附加则为空)。 - lightThe Light attached to this GameObject (null if there is none attached).
Light附加到GameObject(游戏物体)(如无附加则为空)。 - animationThe Animation attached to this GameObject (null if there is none attached).
Animation附加到GameObject(游戏物体)(如无附加则为空)。 - constantForceThe ConstantForce attached to this GameObject (null if there is none attached).
ConstantForce附加到GameObject(游戏物体)(如无附加则为空)。 - rendererThe Renderer attached to this GameObject (null if there is none attached).
Renderer附加到GameObject(游戏物体)(如无附加则为空)。 - audioThe AudioSource attached to this GameObject (null if there is none attached).
AudioSource附加到GameObject(游戏物体)(如无附加则为空)。 - guiTextThe GUIText attached to this GameObject (null if there is none attached).
GUIText附加到GameObject(游戏物体)(如无附加则为空)。 - networkViewThe NetworkView attached to this GameObject (Read Only). (null if there is none attached)
NetworkView附加到GameObject(游戏物体)(只读)(如无附加则为空)。 - guiTextureThe GUITexture attached to this GameObject (Read Only). (null if there is none attached)
GUITexture附加到GameObject(游戏物体)(只读)(如无附加则为空)。 - colliderThe Collider attached to this GameObject (null if there is none attached).
Collider附加到GameObject(游戏物体)(如无附加则为空)。 - hingeJointThe HingeJoint attached to this GameObject (null if there is none attached).
HingeJoint附加到GameObject(游戏物体)(如无附加则为空)。 - particleEmitterThe ParticleEmitter attached to this GameObject (null if there is none attached).
ParticleEmitter附加到GameObject(游戏物体)(如无附加则为空)。 - gameObjectThe game object this component is attached to. A component is always attached to a game object.
组件附加的游戏物体。一个组件总是被附加到一个游戏物体。 - tagThe tag of this game object.
游戏物体的标签。
- nameThe name of the object. //物体的名字
- hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions继承函数
- GetComponentReturns the component of Type type if the game object has one attached, null if it doesn't.
如果游戏物体有一个附加,则返回Type类型的组件,如果没有则为null。 - GetComponent.<T>
- GetComponentReturns the component with name type if the game object has one attached, null if it doesn't.
如果游戏物体有一个附加,则返回名字类型组件,如果没有则为null。 - GetComponentInChildrenReturns the component of Type type in the GameObject or any of its children using depth first search.
返回Type类型组件,在GameObject或它的任何子物体使用深度优先搜索,仅返回激活的组件。 - GetComponentInChildren.<T>
- GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children.
在GameObject或任何它的子物体,返回全部Type类型组件 - GetComponentsInChildren.<T>
- GetComponentsReturns all components of Type type in the GameObject.
在游戏物体返回全部Type类型组件。 - GetComponents.<T>
- CompareTagIs this game object tagged tag?
游戏物体有被标记标签么? - SendMessageUpwardsCalls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour
在游戏物体每一个MonoBehaviour和每一个behaviour的祖先上调用名为methodName的方法。 - SendMessageCalls the method named methodName on every MonoBehaviour in this game object.
在游戏物体每一个MonoBehaviour上调用名为methodName的方法。 - BroadcastMessageCalls the method named methodName on every MonoBehaviour in this game object or any of its children.
在游戏物体每一个MonoBehaviour和它的全部子物体上调用名为methodName的方法。
- GetInstanceIDReturns the instance id of the object.
返回物体的实例ID - ToStringReturns the name of the game object.
返回游戏物体的名称。
Inherited Class Functions继承类函数
- DestroyRemoves a gameobject, component or asset.
删除一个游戏物体、组件或资源 - DestroyImmediateDestroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。 - DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。 - FindObjectOfTypeReturns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。 - FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表 - InstantiateClones the object original and returns the clone.
克隆原始物体,并返回克隆的物体