EditorUtility
- ClearProgressBar
- CloneComponent
- CollectDeepHierarchy
- CollectDependencies
- CompressTexture
- CopySerialized
- CreateEmptyPrefab
- CreateGameObjectWithHideFlags
- DisplayCancelableProgressBar
- DisplayDialogComplex
- DisplayDialog
- DisplayPopupMenu
- DisplayProgressBar
- ExtractOggFile
- FindPrefabRoot
- FocusProjectWindow
- FormatBytes
- GetObjectEnabled
- GetPrefabParent
- GetPrefabType
- InstanceIDToObject
- InstantiatePrefab
- IsPersistent
- OpenFilePanel
- OpenFolderPanel
- ReconnectToLastPrefab
- ReplacePrefab
- ResetGameObjectToPrefabState
- ResetToPrefabState
- SaveFilePanelInProject
- SaveFilePanel
- SaveFolderPanel
- SetDirty
- SetObjectEnabled
- SetSelectedWireframeHidden
- UnloadUnusedAssetsIgnoreM...
- UnloadUnusedAssets
EditorUtility.CollectDeepHierarchy 收集深度层级
static function CollectDeepHierarchy (roots : Object[]) : Object[]
Description描述
Calculates and returns a list of all assets the assets listed in roots depend on.
计算并返回所有资源的列表,在roots依赖的资源列表。
Show list of all assets the assets listed in roots depend on.
// Show list of all assets the assets listed in roots depend on.
// on the selected GameObject
//显示所有资源列表,在roots依赖的资源列表
//在选择的游戏物体上
class EditorUtilityCollectDeepHierarchy extends EditorWindow {
var obj : GameObject = null;
@MenuItem("Examples/Select Dependencies")
static function Init() {
var window = GetWindow(EditorUtilityCollectDeepHierarchy);
window.position = Rect(0, 0, 250, 80);
window.Show();
}
function OnInspectorUpdate() {
Repaint();
}
function OnGUI() {
obj = EditorGUI.ObjectField(Rect(3,3,position.width - 6, 20),
"Find Dependency",
obj,
GameObject);
if(obj) {
if(GUI.Button(Rect(3,25,position.width - 6, 20), "Check Dependencies"))
Selection.objects = EditorUtility.CollectDeepHierarchy([obj]);
} else {
EditorGUI.LabelField(Rect(3,25,position.width - 6,20),
"Missing:",
"Select an object first");
}
}
}
最后修改:2011年7月15日 Friday 18:59