기본 에셋이 Asset 정보창에 표시되지 않는 오류 수정
This commit is contained in:
@@ -1805,6 +1805,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: f9c6f8c6f0c462a4ab09d615c0d0db6c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
header: {fileID: 0}
|
||||
Area: {fileID: 0}
|
||||
state: 0
|
||||
resizeDirection: 0
|
||||
@@ -2512,7 +2513,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1098354475033513177
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace Studio.Manage
|
||||
public class AssetManager : Manager
|
||||
{
|
||||
public List<string> localAssetPaths = new List<string>();
|
||||
private List<AssetData> loadAsset = new List<AssetData>();
|
||||
private List<HierarchyItem> loadHierarchy = new List<HierarchyItem>();
|
||||
|
||||
private List<string> folderPathList = new List<string>();
|
||||
private Dictionary<int, HierarchyItem> itemDict = new Dictionary<int, HierarchyItem>();
|
||||
@@ -67,9 +69,12 @@ namespace Studio.Manage
|
||||
{
|
||||
localAssetPaths.Clear();
|
||||
folderPathList.Clear();
|
||||
loadAsset.Clear();
|
||||
loadHierarchy.Clear();
|
||||
}
|
||||
public void LoadAssetSettingFBXDirectorys(int index, string folderPath)
|
||||
{
|
||||
Debug.Log("에셋 폴더 로드");
|
||||
if (!assetSettingPaths.ContainsKey(index))
|
||||
{
|
||||
assetSettingPaths.Add(index, folderPath);
|
||||
@@ -116,6 +121,7 @@ namespace Studio.Manage
|
||||
|
||||
public void LoadLocalFBXDirectorys()
|
||||
{
|
||||
Debug.Log("로컬 fbx 폴더 로드");
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
fbxFileManager.LoadLocalFBXDirectorys(folderPathList);
|
||||
var assetManagerData = new AssetManagerData();
|
||||
@@ -126,11 +132,15 @@ namespace Studio.Manage
|
||||
onSetAssetSetting?.Invoke(data);
|
||||
}
|
||||
|
||||
private void OnSetAssetHierarchyData()
|
||||
{
|
||||
|
||||
}
|
||||
private void OnLoadCustomAsset()
|
||||
{
|
||||
var projectManager = ManagerHub.instance.Get<ProjectManager>();
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
onSetAssetHierarchy?.Invoke(fbxFileManager.fileDatas);
|
||||
|
||||
if (projectManager.curProjectData == null || projectManager.curProjectData.assetDatas.Count <= 0)
|
||||
@@ -148,31 +158,38 @@ namespace Studio.Manage
|
||||
Debug.Log(connector.connectedAssets.Count);
|
||||
foreach (AssetData asset in assets)
|
||||
{
|
||||
|
||||
RestoreHierarchy(asset);
|
||||
}
|
||||
}
|
||||
private void LoadAsset(AssetData asset)
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
connector.OnLoadAsset(asset);
|
||||
if (!loadAsset.Contains(asset))
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
connector.OnLoadAsset(asset);
|
||||
|
||||
itemDict.TryAdd(asset.id, connector.connectedAssets.Last().hierarchyItem);
|
||||
itemDict.TryAdd(asset.id, connector.connectedAssets.Last().hierarchyItem);
|
||||
loadAsset.Add(asset);
|
||||
}
|
||||
}
|
||||
|
||||
private void RestoreHierarchy(AssetData asset)
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
|
||||
foreach (int id in asset.children)
|
||||
if (!loadHierarchy.Contains(itemDict[asset.id]))
|
||||
{
|
||||
HierarchyItem parent = itemDict[asset.id];
|
||||
HierarchyItem child = itemDict[id];
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
|
||||
if (parent == null || child == null)
|
||||
continue;
|
||||
foreach (int id in asset.children)
|
||||
{
|
||||
HierarchyItem parent = itemDict[asset.id];
|
||||
HierarchyItem child = itemDict[id];
|
||||
|
||||
connector.OnRestoreHierarchy(parent, child);
|
||||
if (parent == null || child == null)
|
||||
continue;
|
||||
|
||||
connector.OnRestoreHierarchy(parent, child);
|
||||
loadHierarchy.Add(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void SetAssetInfo(string name)
|
||||
|
||||
@@ -90,10 +90,7 @@ namespace Studio.AssetTool
|
||||
OnLoadComplete(assetData);
|
||||
}
|
||||
|
||||
if (filePaths.Count > 0)
|
||||
{
|
||||
OnDirectoryLoadComplete();
|
||||
}
|
||||
OnDirectoryLoadComplete();
|
||||
}
|
||||
public void LoadLocalFBXDirectorys(List<string> folderPaths)
|
||||
{
|
||||
|
||||
@@ -99,8 +99,8 @@ namespace Studio
|
||||
for (int i = 0; i < assetManagerData.localAssetsPaths.Count; i++)
|
||||
{
|
||||
var item = Instantiate(prf_folderPathItem, Content_LocalAssets);
|
||||
item.onEndEditInputFieldURL += LoadAsstsPath;
|
||||
item.SetData(assetManagerData.localAssetsPaths[i]);
|
||||
item.onEndEditInputFieldURL += LoadAsstsPath;
|
||||
folderPathItems.Add(item);
|
||||
selectedURLs.Add(i, item.GetURL());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user