SelectionMode 选择模式
Enumeration
SelectionMode can be used to tweak the selection returned by Selection.GetTransforms.
SelectionMode可以用于Selection.GetTransforms返回的选择。
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"引用。
The default transform selection mode is: SelectionMode.TopLevel | SelectionMode.ExcludePrefab | SelectionMode.Editable
默认的transform选择模式为:SelectionMode.TopLevel | SelectionMode.ExcludePrefab | SelectionMode.Editable
Values值
-
Return the whole selection. // 返回整个选择。
-
Only return the topmost selected transform. A selected child of another selected transform will be filtered out.
仅返回最顶层选择的变换;其他选择的子对象将被过滤出。 -
Return the selection and all child transforms of the selection.
返回选择和所有选择的子变换。 -
Excludes any prefabs from the selection.
从选择中排除任何预制。 -
Excludes any objects which shall not be modified.
排除任何对象不得修改。 -
Only return objects that are assets in the Asset directory.
仅返回资源目录中的资源对象。 -
If the selection contains folders, also include all assets and subfolders within that folder in the file hierarchy.
如果选择包含文件夹,也包含所有资源和子目录。
最后修改:2011年7月19日 Tuesday 17:54