void ShowTest() { pos = EditorGUILayout.BeginScrollView(pos); // if (_readyToFind != null) { // for(int i = 0;i < _readyToFind.Count;i++){ // EditorGUILayout.LabelField(_readyToFind[i]); // } // } // // if (_prefabs != null) { // for(int i = 0;i < _prefabs.Count;i++){ // // EditorGUILayout.LabelField(_prefabs[i]._prefabPath); // _prefabs[i]._showDependencies = EditorGUILayout.Toggle(_prefabs[i]._showDependencies); // if(_prefabs[i]._showDependencies && _prefabs[i]._dependencies!=null){ // for(int x = 0;x<_prefabs[i]._dependencies.Count;x++){ // EditorGUILayout.LabelField(_prefabs[i]._dependencies[x]); // } // } // } // } if (_AssetUsedData != null) { _AssetUsedData.OnGUI(); } EditorGUILayout.EndScrollView(); }
void ShowTest() { bool change = false; EditorGUILayout.BeginHorizontal(); if (_AssetType != null) { _SelectAssetType = EditorGUILayout.Popup("查询文件类型:", _SelectAssetType, _AssetType, GUILayout.MaxWidth(300)); if (GUI.changed) { change = true; EditorGUILayout.EndHorizontal(); _artFindSet._onlyShowNoUsed = false; _AllAssetsData.GetDepend(_SelectAssetType, _prefabs); } } if (!change) { EditorGUILayout.EndHorizontal(); } if (_AssetUsedData != null) { if (GUILayout.Button("查看全局数据")) { _AssetUsedData = null; } if (_AssetUsedData != null) { _AssetUsedData.OnGUI(); } } if (_AssetUsedData == null && _SelectAssetType != -1) { _artFindSet._onlyShowNoUsed = EditorGUILayout.Toggle(!_artFindSet._onlyShowNoUsed?"显示使用的":"显示未使用的", _artFindSet._onlyShowNoUsed); EditorGUILayout.LabelField(_AssetType[_SelectAssetType] + "总资源数:" + _AllAssetsData._data[_SelectAssetType]._allAssets); EditorGUILayout.LabelField(_AssetType[_SelectAssetType] + "被使用数:" + _AllAssetsData._data[_SelectAssetType]._allUsedAssets); EditorGUILayout.LabelField(_AssetType[_SelectAssetType] + "未使用数:" + _AllAssetsData._data[_SelectAssetType]._allUnUsedAssets); pos = EditorGUILayout.BeginScrollView(pos); _AllAssetsData.OnGUI(_SelectAssetType, _artFindSet); EditorGUILayout.EndScrollView(); } }