Object.GetInstanceID 获取实例ID

function GetInstanceID () : int

Description描述

Returns the instance id of the object.

返回物体的实例id。

The instance id of an object is always guaranteed to be unique.

物体的实例id始终保证是独一无二的。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(GetInstanceID());
	}
}
print(GetInstanceID());
Page last updated: 2010-12-8