EditorGUIUtility.PingObject Ping物体

static function PingObject (obj : Object) : void
static function PingObject (targetInstanceID : int) : void

Description描述

Ping an object in a window like clicking it in an inspector

在窗口Ping一个物体,就像在检视面板点击它。

// Pings the currently selected Object
//Ping当前选择的物体
@MenuItem("Examples/Ping Selected")
static function Ping() {
	if(!Selection.activeObject) {
		Debug.LogError("Select an object to ping");
		return;
	}
	EditorGUIUtility.PingObject(Selection.activeObject);
}
Page last updated: 2011-7-15