Component
- animation
- audio
- BroadcastMessage
- camera
- collider
- CompareTag
- constantForce
- gameObject
- GetComponent.<T>
- GetComponentInChildren.<T>
- GetComponentInChildren
- GetComponents.<T>
- GetComponentsInChildren.<T>
- GetComponentsInChildren
- GetComponents
- GetComponent
- guiTexture
- guiText
- hingeJoint
- light
- networkView
- particleEmitter
- renderer
- rigidbody
- SendMessageUpwards
- SendMessage
- tag
- transform
Component.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() {
Debug.Log("Transform Tag is: " + tag);
}
}
//打印这个Transform的标签
Debug.Log("Transform Tag is: " + tag);
最后修改:2010年12月11日 Saturday 2:19