Skip to content

Commit

Permalink
[feat][editor]:增加对构建目录丢失对象的恢复
Browse files Browse the repository at this point in the history
  • Loading branch information
CatImmortal committed May 31, 2023
1 parent 880a695 commit bfa468f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ private void CellGUI(Rect cellRect, TreeViewItem item, ColumnType column, ref Ro

case ColumnType.Object:
EditorGUI.BeginDisabledGroup(true);
if (directoryItem.Data.DirectoryObj == null && !string.IsNullOrEmpty(directoryItem.Data.DirectoryName))
{
directoryItem.Data.DirectoryObj =
AssetDatabase.LoadAssetAtPath<Object>(directoryItem.Data.DirectoryName);
}
EditorGUI.ObjectField(cellRect, directoryItem.Data.DirectoryObj, typeof(Object), false);
EditorGUI.EndDisabledGroup();
break;
Expand Down

0 comments on commit bfa468f

Please sign in to comment.