Object.name 名字

var name : string

Description描述

The name of the object.

物体的名字

Components share the same name with the game object and all attached components.

组件与游戏物体和所有附加的组件共享相同的名字。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		name = "Hello";
	}
}
// Changes the name of the game object to Hello
//改变游戏物体的名字为hello
name = "Hello";
Page last updated: 2010-12-8