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.tag 标签
var tag : string
Description描述
The tag of this game object.
A tag can be used to identify a game object. Tags must be declared in the tag manager before using them.
游戏物体的标签。
一个标签可以用于识别一个游戏物体标签必须在使用之前在标签管理器里面先声明。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
gameObject.tag = "Player";
}
}
gameObject.tag = "Player";
最后修改:2011年5月19日 Thursday 22:18