Selection 选择
Access to the selection in the editor.
在编辑器类中访问选择对象。
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
注意:这是一个编辑器类,如果想使用它你需要把它放到工程目录下的Assets/Editor文件夹下。编辑器类在UnityEditor命名空间下。所以当使用C#脚本时,你需要在脚本前面加上 "using UnityEditor"引用。
Class Variables类变量
-
Returns the top level selection, excluding prefabs.
返回顶层的选择物,不包括预设物。 -
Returns the active transform. (The one shown in the inspector)
返回激活的变换。(在检查面板中显示) -
Returns the actual game object selection. Includes prefabs, non-modifyable objects.
返回实际选择的游戏物体。包括预设物,不可修改的物体。 -
Returns the active game object. (The one shown in the inspector)
返回激活的游戏物体。(在检查面板中显示) -
Returns the actual object selection. Includes prefabs, non-modifyable objects.
返回选择的激活的物体。包括预设物,不可改动的物体。 -
Returns the instanceID of the actual object selection. Includes prefabs, non-modifyable objects.
返回实际选择的激活的物体的实例ID。包括预设物,不可改动的物体。 -
The actual unfiltered selection from the Scene.
来自场景中实际未过滤的选择物。 -
The actual unfiltered selection from the Scene returned as instance ids instead of objects.
在场景中激活的过滤选择返回实例的ID代替objects。
Class Functions类函数
-
Returns whether an object is contained in the current selection.
返回一个物体是否被包含在当前的选择中。 -
Allows for fine grained control of the selection type using the SelectionMode bitmask.
允许对选择类型进行精细的控制,使用SelectionMode枚举类型。 -
Returns the current selection filtered by type and mode.
返回通过类型和选择模式过滤的当前选择的物体。
最后修改:2011年4月11日 Monday 14:10