void OnListSelectChange(ListElement data) { mSelectNodel = data; //var hierarchyData = (HierarchyListWindow.HierarchyElementData) data.ElementData; mSelectElement = InspectorElement.GetInspectorElement(data); if (mSelectElement != null) { infoWindow.Refresh(mSelectElement); } }
public static void ApplyStrategyGroup(ListElement folder, int strategyIndex) { List <ListElement> child = new List <ListElement>(); GetCurrentChildElements(folder, ref child); for (int i = 0; i < child.Count; i++) { InspectorElement element = InspectorElement.GetInspectorElement(child[i]); if (element != null) { ApplyStrategyGroup((InspectorElementPrefab)element, strategyIndex); } } }
public bool OnAddNewElement(ListElement element) { InspectorElement newElement = InspectorElement.GetInspectorElement(element); if (ResourcElements.ContainsKey(element.InstanceID) == false) { ResourcElements.Add(element.InstanceID, newElement); return(true); } else if (ResourcElements[element.InstanceID] != newElement) { Debug.LogError(string.Format("hash conflict file [{0}] file [{1}] hash [{2}]", ResourcElements[element.InstanceID].AssetFilePath, element.Path, element.InstanceID)); } return(false); }
public static void GetSubFolderChildElements(ListElement parentElement, ref List <ListElement> result) { parentElement.TryUpdateFile(); // 子文件没有子节点 if (parentElement.ChildElements.Count == 0) { result.Add(parentElement); return; } for (int i = 0; i < parentElement.ChildElements.Count; i++) { if (parentElement.ChildElements[i].ChildElements.Count > 0) { GetAllChildElements(parentElement, ref result); } else { InspectorElement element = InspectorElement.GetInspectorElement(parentElement.ChildElements[i]); Debug.Log(string.Format("忽略文件 [{0}]!", element.AssetFilePath)); } } }