TopMenu 의 New Project, Open Project 기능 추가

This commit is contained in:
정영민
2025-05-24 17:03:39 +09:00
parent fbf67a2f36
commit b0deccbd89
29 changed files with 4182 additions and 1646 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1797,6 +1797,10 @@ PrefabInstance:
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 136411123651892915, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -30
objectReference: {fileID: 0}
- target: {fileID: 1006177941616694947, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3} - target: {fileID: 1006177941616694947, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 1
@@ -1821,66 +1825,6 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -85 value: -85
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1251556539314681174, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1251556539314681174, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1251556539314681174, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1251556539314681174, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1453934114001025659, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1453934114001025659, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1453934114001025659, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1453934114001025659, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2374106145558075720, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2374106145558075720, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2895846756970397937, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_Color.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2895846756970397937, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_Color.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2895846756970397937, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_Color.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3254036307801150249, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3254036307801150249, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3531496374987278801, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3} - target: {fileID: 3531496374987278801, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
@@ -1897,10 +1841,6 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4049328991925839773, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4171474248864594299, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3} - target: {fileID: 4171474248864594299, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
@@ -1921,46 +1861,6 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Panel_NewProjectInfo value: Panel_NewProjectInfo
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6092324537095634317, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6933982812649115435, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6933982812649115435, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6933982812649115435, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.x
value: 136.26
objectReference: {fileID: 0}
- target: {fileID: 6933982812649115435, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 68.13
objectReference: {fileID: 0}
- target: {fileID: 6933982812649115435, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -40
objectReference: {fileID: 0}
- target: {fileID: 7216954628468018826, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7216954628468018826, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7216954628468018826, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7216954628468018826, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7820417904637097140, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3} - target: {fileID: 7820417904637097140, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
@@ -2057,38 +1957,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8036671826876076572, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.x
value: 60.67
objectReference: {fileID: 0}
- target: {fileID: 8036671826876076572, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.y
value: 23.01
objectReference: {fileID: 0}
- target: {fileID: 8106588635392288030, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8106588635392288030, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8106588635392288030, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.x
value: 380
objectReference: {fileID: 0}
- target: {fileID: 8106588635392288030, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8106588635392288030, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 190
objectReference: {fileID: 0}
- target: {fileID: 8106588635392288030, guid: 84dfc296b72fa084b86783a94204fe9c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -145
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
@@ -2193,23 +2061,23 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3548633605584249014, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3548633605584249014, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 435 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3625024966114329480, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -25 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3951532803893592897, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3951532803893592897, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
@@ -2225,7 +2093,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3951532803893592897, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3951532803893592897, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 50 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3951532803893592897, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 3951532803893592897, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
@@ -2237,43 +2105,43 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4188235441515691998, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 4188235441515691998, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 50.89 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4188235441515691998, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 4188235441515691998, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 23.01 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6611736758746230093, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 6611736758746230093, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 136.26 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6611736758746230093, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 6611736758746230093, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 28.76 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6743587899122872675, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 6743587899122872675, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 460 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6743587899122872675, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 6743587899122872675, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 50 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 370 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 7142951765868690235, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -25 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7415030585086245894, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 7415030585086245894, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_Color.b propertyPath: m_Color.b
@@ -2289,19 +2157,19 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 165 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3} - target: {fileID: 8418443472057348741, guid: 8795ea0c7698ec949b563139a3f042d9, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -25 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1439898dc68446940b764bda65d2b285
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@ namespace Studio.Repositories
{ {
public class CustomAssetDataRepository public class CustomAssetDataRepository
{ {
List<CustomAssetData> assetDatas = new List<CustomAssetData>(); public List<CustomAssetData> assetDatas = new List<CustomAssetData>();
public bool isEmpty => assetDatas.Count == 0; public bool isEmpty => assetDatas.Count == 0;

View File

@@ -14,7 +14,11 @@ namespace Studio.Command
public void Execute() public void Execute()
{ {
var projectManager = ManagerHub.instance.Get<ProjectManager>(); var projectManager = ManagerHub.instance.Get<ProjectManager>();
projectManager.NewProjectSettingData(); var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
var projectName = canvas_Popup.panel_newprojectinfo.GetProjectName();
var projectPath = canvas_Popup.panel_newprojectinfo.GetProjectRoute();
projectManager.NewProjectSettingData(projectName, projectPath);
//CommandInvoker.instance.Invoke(new RemoveAllObjectCommand()); //CommandInvoker.instance.Invoke(new RemoveAllObjectCommand());
} }

View File

@@ -14,7 +14,9 @@ namespace Studio.Command
public void Execute() public void Execute()
{ {
var projectManager = ManagerHub.instance.Get<ProjectManager>(); var projectManager = ManagerHub.instance.Get<ProjectManager>();
projectManager.OpenProejctSettingData(); var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
projectManager.OpenProejctSettingData(canvas_Popup.panel_openprojectinfo.GetProjectRoute());
} }
} }
} }

View File

@@ -0,0 +1,26 @@
using Studio.Command;
using Studio.Manage;
using UnityEngine;
namespace Studio
{
public class TopMenuNewProjectCommand : IIrreversibleCommand
{
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public bool CanExecute()
{
throw new System.NotImplementedException();
}
public void Execute()
{
var projectManager = ManagerHub.instance.Get<ProjectManager>();
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
var projectName = canvas_Popup.panel_topmenunewprojectinfo.GetProjectName();
var projectPath = canvas_Popup.panel_topmenunewprojectinfo.GetProjectRoute();
projectManager.NewProjectSettingData(projectName, projectPath);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6da120c5828408748b14ce26595a71dc

View File

@@ -0,0 +1,25 @@
using Studio.Command;
using Studio.Manage;
using UnityEngine;
namespace Studio
{
public class TopMenuOpenProjectCommand : IIrreversibleCommand
{
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public bool CanExecute()
{
throw new System.NotImplementedException();
}
public void Execute()
{
var projectManager = ManagerHub.instance.Get<ProjectManager>();
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
var projectPath = canvas_Popup.panel_topmenuopenprojectinfo.GetProjectRoute();
projectManager.OpenProejctSettingData(projectPath);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 4df673e7f08965a498147d86a45602cf

View File

@@ -16,6 +16,9 @@ namespace Studio
} }
public void LoadLocalFBXDirectorys(List<string> folderPaths) public void LoadLocalFBXDirectorys(List<string> folderPaths)
{ {
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
folderPath.Clear();
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>(); var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
foreach(var path in folderPaths) foreach(var path in folderPaths)

View File

@@ -27,6 +27,12 @@ namespace Studio.Manage
canvas_popup.panel_openprojectinfo.onClickOpen += canvas_popup.panel_start.Close; canvas_popup.panel_openprojectinfo.onClickOpen += canvas_popup.panel_start.Close;
canvas_popup.panel_openprojectinfo.onClickOpen += canvas_popup.panel_openprojectinfo.Close; canvas_popup.panel_openprojectinfo.onClickOpen += canvas_popup.panel_openprojectinfo.Close;
canvas_popup.panel_topmenunewprojectinfo.onClickCreate += canvas_static.panel_scenetab.Init;
canvas_popup.panel_topmenunewprojectinfo.onClickCreate += canvas_popup.panel_topmenunewprojectinfo.Close;
canvas_popup.panel_topmenuopenprojectinfo.onClickOpen += canvas_static.panel_scenetab.Init;
canvas_popup.panel_topmenuopenprojectinfo.onClickOpen += canvas_popup.panel_topmenuopenprojectinfo.Close;
canvas_popup.panel_startsetting.onClickAppSetting += canvas_popup.panel_appsetting.Active; canvas_popup.panel_startsetting.onClickAppSetting += canvas_popup.panel_appsetting.Active;
canvas_popup.panel_startsetting.onClickAuthSetting += canvas_popup.panel_authsetting.Active; canvas_popup.panel_startsetting.onClickAuthSetting += canvas_popup.panel_authsetting.Active;
canvas_popup.panel_startsetting.onClickAPISetting += canvas_popup.panel_apisetting.Active; canvas_popup.panel_startsetting.onClickAPISetting += canvas_popup.panel_apisetting.Active;

View File

@@ -9,6 +9,7 @@ using UnityEngine;
using System.Linq; using System.Linq;
using Studio.HierarchyTree; using Studio.HierarchyTree;
using Studio.Command; using Studio.Command;
using Studio.AssetLibraryTree;
namespace Studio.Manage namespace Studio.Manage
{ {
@@ -42,20 +43,38 @@ namespace Studio.Manage
onSaveModelDatas += canvas_Popup.panel_3dfactorysetting.SetDynamic3DModelSetting; onSaveModelDatas += canvas_Popup.panel_3dfactorysetting.SetDynamic3DModelSetting;
onAssetManagerDatas += canvas_Popup.panel_assetmanager.SetAssetManager; onAssetManagerDatas += canvas_Popup.panel_assetmanager.SetAssetManager;
} }
public void NewProjectSettingData() private void ResetProjectSettingData()
{ {
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>(); connector = ManagerHub.instance.Get<CustomAssetConnector>();
curProjectName = canvas_Popup.panel_newprojectinfo.GetProjectName(); onAppSetting?.Invoke(null);
curProjectPath = canvas_Popup.panel_newprojectinfo.GetProjectRoute(); onAPISetting?.Invoke(null);
curProjectTemplate = canvas_Popup.panel_newprojectinfo.GetProjectTemplate(); onMQTTSetting?.Invoke(null);
curProjectData = null; onSaveModelDatas?.Invoke(null);
onAssetManagerDatas?.Invoke(null);
foreach (var customAssetData in connector.connectedAssets)
{
connector.assetScrollView.RemoveItem(customAssetData.assetData.folderName, AssetLibraryItemType.folder);
connector.assetScrollView.RemoveItem(customAssetData.assetData.assetName, AssetLibraryItemType.file);
} }
public void OpenProejctSettingData() CommandInvoker.instance.Invoke(new RemoveAllObjectCommand());
}
public void NewProjectSettingData(string proejctName, string projectPath)
{
curProjectName = proejctName;
curProjectPath = projectPath;
curProjectTemplate = string.Empty;
curProjectData = null;
ResetProjectSettingData();
}
public void OpenProejctSettingData(string filePath)
{ {
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>(); var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
var assetManager = ManagerHub.instance.Get<AssetManager>(); var assetManager = ManagerHub.instance.Get<AssetManager>();
var filePath = canvas_Popup.panel_openprojectinfo.GetProjectRoute();
ResetProjectSettingData();
if (File.Exists(filePath)) if (File.Exists(filePath))
{ {

View File

@@ -17,6 +17,9 @@ namespace Studio.Manage
GameObject assetLibraryWindow = canvas_Popup.panel_assetlibrary.gameObject; GameObject assetLibraryWindow = canvas_Popup.panel_assetlibrary.gameObject;
GameObject repository = canvas_Popup.panel_datarepository.gameObject; GameObject repository = canvas_Popup.panel_datarepository.gameObject;
canvas_static.panel_studiotopbar.onClickNewProject += canvas_Popup.panel_topmenunewprojectinfo.Open;
canvas_static.panel_studiotopbar.onClickOpenProject += canvas_Popup.panel_topmenuopenprojectinfo.Open;
canvas_static.panel_studiotopbar.onClickAssetManager += canvas_Popup.panel_assetmanager.Open; canvas_static.panel_studiotopbar.onClickAssetManager += canvas_Popup.panel_assetmanager.Open;
canvas_static.panel_studiotopbar.onClickAssetLibraryWindow += (() => assetLibraryWindow.SetActive(true)); canvas_static.panel_studiotopbar.onClickAssetLibraryWindow += (() => assetLibraryWindow.SetActive(true));
canvas_static.panel_studiotopbar.onClickHierarchyWindow += (() => hierarchyWindow.SetActive(true)); canvas_static.panel_studiotopbar.onClickHierarchyWindow += (() => hierarchyWindow.SetActive(true));

View File

@@ -17,6 +17,8 @@ namespace Studio
public Panel_Start panel_start; public Panel_Start panel_start;
public Panel_NewProjectInfo panel_newprojectinfo; public Panel_NewProjectInfo panel_newprojectinfo;
public Panel_OpenProjectInfo panel_openprojectinfo; public Panel_OpenProjectInfo panel_openprojectinfo;
public Panel_TopMenuNewProjectInfo panel_topmenunewprojectinfo;
public Panel_TopMenuOpenProjectInfo panel_topmenuopenprojectinfo;
public Panel_StartSetting panel_startsetting; public Panel_StartSetting panel_startsetting;
public Panel_AppSetting panel_appsetting; public Panel_AppSetting panel_appsetting;
@@ -88,6 +90,9 @@ namespace Studio
panel_openprojectinfo.onClickOpen += () => CommandInvoker.instance.Invoke(new OpenProjectCommand()); panel_openprojectinfo.onClickOpen += () => CommandInvoker.instance.Invoke(new OpenProjectCommand());
panel_assetmanager.onSelectedURLs += () => CommandInvoker.instance.Invoke(new LoadLocalAssetCommand()); panel_assetmanager.onSelectedURLs += () => CommandInvoker.instance.Invoke(new LoadLocalAssetCommand());
panel_topmenunewprojectinfo.onClickCreate += () => CommandInvoker.instance.Invoke(new TopMenuNewProjectCommand());
panel_topmenuopenprojectinfo.onClickOpen += () => CommandInvoker.instance.Invoke(new TopMenuOpenProjectCommand());
panel_apiconnectmodal.onClickFilterButton += dataManager.SetFilterData; panel_apiconnectmodal.onClickFilterButton += dataManager.SetFilterData;
panel_apiconnectmodal.onSaveAPIData += dataManager.SetAPIData; panel_apiconnectmodal.onSaveAPIData += dataManager.SetAPIData;

View File

@@ -30,6 +30,7 @@ namespace Studio.UI
statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout); statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
//panel_studiotopbar.onClickAssetLibraryWindow += fbxFileManager.LoadLocalData; //panel_studiotopbar.onClickAssetLibraryWindow += fbxFileManager.LoadLocalData;
panel_studiotopbar.onClickNewProject += () => CommandInvoker.instance.Invoke(new SaveProjectCommand());
panel_studiotopbar.onClickSaveProject += () => CommandInvoker.instance.Invoke(new SaveProjectCommand()); panel_studiotopbar.onClickSaveProject += () => CommandInvoker.instance.Invoke(new SaveProjectCommand());
} }
} }

View File

@@ -55,9 +55,9 @@ namespace Studio
item.SetData(dynamicObjectDatas, modelList); item.SetData(dynamicObjectDatas, modelList);
dynamicObjectItems.Add(item); dynamicObjectItems.Add(item);
UpdateLayout(); UpdateLayoutAddItem();
} }
private void UpdateLayout() private void UpdateLayoutAddItem()
{ {
var sizeDelta = Panel_3DGenerationSetting.sizeDelta; var sizeDelta = Panel_3DGenerationSetting.sizeDelta;
sizeDelta.y += prf_dynamicObjectItem.rectTransform.rect.height + 10f; sizeDelta.y += prf_dynamicObjectItem.rectTransform.rect.height + 10f;
@@ -67,6 +67,16 @@ namespace Studio
Button_AddDynamicObjectItem.transform.SetAsLastSibling(); Button_AddDynamicObjectItem.transform.SetAsLastSibling();
} }
private void UpdateLayoutRemoveItem()
{
var sizeDelta = Panel_3DGenerationSetting.sizeDelta;
sizeDelta.y -= prf_dynamicObjectItem.rectTransform.rect.height + 10f;
Panel_3DGenerationSetting.sizeDelta = sizeDelta;
LayoutRebuilder.ForceRebuildLayoutImmediate(Content);
Button_AddDynamicObjectItem.transform.SetAsLastSibling();
}
private void OnUISetting(UI_DynamicObjectItem rectTransform) private void OnUISetting(UI_DynamicObjectItem rectTransform)
{ {
onUISetting?.Invoke(rectTransform); onUISetting?.Invoke(rectTransform);
@@ -75,6 +85,7 @@ namespace Studio
{ {
dynamicObjectItems.Remove(item); dynamicObjectItems.Remove(item);
Destroy(item.gameObject); Destroy(item.gameObject);
UpdateLayoutRemoveItem();
} }
public Dynamic3DModelSetting GetDynamic3DModelSetting() public Dynamic3DModelSetting GetDynamic3DModelSetting()
{ {
@@ -87,6 +98,16 @@ namespace Studio
} }
public void SetDynamic3DModelSetting(Dynamic3DModelSetting saveModelDatas) public void SetDynamic3DModelSetting(Dynamic3DModelSetting saveModelDatas)
{ {
foreach(var item in dynamicObjectItems)
{
Destroy(item.gameObject);
UpdateLayoutRemoveItem();
}
dynamicObjectItems.Clear();
if (saveModelDatas == null)
return;
foreach(var modelData in saveModelDatas.modelDatas) foreach(var modelData in saveModelDatas.modelDatas)
{ {
var item = Instantiate(prf_dynamicObjectItem, DynamicObjectItemContent); var item = Instantiate(prf_dynamicObjectItem, DynamicObjectItemContent);
@@ -96,7 +117,7 @@ namespace Studio
item.SetModelData(modelData); item.SetModelData(modelData);
dynamicObjectItems.Add(item); dynamicObjectItems.Add(item);
UpdateLayout(); UpdateLayoutAddItem();
} }
} }
} }

View File

@@ -56,6 +56,15 @@ namespace Studio
} }
public void SetAPISetting(APISetting apiSetting) public void SetAPISetting(APISetting apiSetting)
{ {
foreach(var item in apiConnectionItems)
{
Destroy(item.gameObject);
}
apiConnectionItems.Clear();
if (apiSetting == null)
return;
foreach (var apiConnection in apiSetting.apiConnections) foreach (var apiConnection in apiSetting.apiConnections)
{ {
var item = Instantiate(prf_APIConnectionItem, Content); var item = Instantiate(prf_APIConnectionItem, Content);

View File

@@ -170,6 +170,18 @@ namespace Studio.UI
} }
public void SetAppSetting(AppSetting appSetting) public void SetAppSetting(AppSetting appSetting)
{ {
if (appSetting == null)
{
Image_Selected.sprite = null;
Dropdown_AnimationStyle.value = 0;
Dropdown_ProgressBarStyle.value = 0;
Toggle_AutoStart.isOn = true;
Dropdown_DefaultLangauge.value = 0;
InputField_LanguagePack.text = string.Empty;
return;
}
if (!string.IsNullOrEmpty(appSetting.splashImageByte)) if (!string.IsNullOrEmpty(appSetting.splashImageByte))
{ {
var bytes = Convert.FromBase64String(appSetting.splashImageByte); var bytes = Convert.FromBase64String(appSetting.splashImageByte);
@@ -180,7 +192,7 @@ namespace Studio.UI
Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f)); Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
Image_Selected.sprite = sprite; Image_Selected.sprite = sprite;
} }
}
Dropdown_AnimationStyle.value = Dropdown_AnimationStyle.options.FindIndex(option => option.text == appSetting.animationStyle); Dropdown_AnimationStyle.value = Dropdown_AnimationStyle.options.FindIndex(option => option.text == appSetting.animationStyle);
Dropdown_ProgressBarStyle.value = Dropdown_ProgressBarStyle.options.FindIndex(option => option.text == appSetting.progressBarStyle); Dropdown_ProgressBarStyle.value = Dropdown_ProgressBarStyle.options.FindIndex(option => option.text == appSetting.progressBarStyle);
Toggle_AutoStart.isOn = appSetting.autoStart; Toggle_AutoStart.isOn = appSetting.autoStart;
@@ -189,3 +201,4 @@ namespace Studio.UI
} }
} }
} }
}

View File

@@ -97,6 +97,15 @@ namespace Studio
{ {
selectedURLs.Clear(); selectedURLs.Clear();
foreach(var item in folderPathItems)
{
Destroy(item.gameObject);
}
folderPathItems.Clear();
if (assetManagerData == null)
return;
foreach (var localPath in assetManagerData.localAssetsPaths) foreach (var localPath in assetManagerData.localAssetsPaths)
{ {
var item = Instantiate(prf_folderPathItem, Content_LocalAssets); var item = Instantiate(prf_folderPathItem, Content_LocalAssets);

View File

@@ -55,6 +55,15 @@ namespace Studio
} }
public void SetMQTTSetting(MQTTSetting mqttSetting) public void SetMQTTSetting(MQTTSetting mqttSetting)
{ {
foreach(var item in mqttConnectionItems)
{
Destroy(item.gameObject);
}
mqttConnectionItems.Clear();
if (mqttSetting == null)
return;
foreach (var mqttConnection in mqttSetting.mqttConnections) foreach (var mqttConnection in mqttSetting.mqttConnections)
{ {
var item = Instantiate(prf_MQTTConnectionItem, Content); var item = Instantiate(prf_MQTTConnectionItem, Content);

View File

@@ -28,13 +28,20 @@ namespace Studio
Toggle_SceneStartSetting.onValueChanged.AddListener(OnSceneStartSettingValueChanged); Toggle_SceneStartSetting.onValueChanged.AddListener(OnSceneStartSettingValueChanged);
Button_AddSceneTab.onClick.AddListener(OnClickAddSceneTabButton); Button_AddSceneTab.onClick.AddListener(OnClickAddSceneTabButton);
foreach (var sceneTabButton in sceneTabButtons)
{
Destroy(sceneTabButton.gameObject);
}
sceneTabButtons.Clear(); sceneTabButtons.Clear();
index = 0;
Toggle_SceneStartSetting.isOn = true; Toggle_SceneStartSetting.isOn = true;
OnClickAddSceneTabButton(); OnClickAddSceneTabButton();
} }
private void OnSceneStartSettingValueChanged(bool isOn) private void OnSceneStartSettingValueChanged(bool isOn)
{ {
Debug.Log(isOn);
onSceneSettingTab?.Invoke(isOn); onSceneSettingTab?.Invoke(isOn);
} }
private void OnClickAddSceneTabButton() private void OnClickAddSceneTabButton()

View File

@@ -41,8 +41,13 @@ namespace Studio
if(isOn == false) if(isOn == false)
{ {
preSelectedToggle = selectedToggle; preSelectedToggle = selectedToggle;
if (selectedToggle != null)
{
selectedToggle.isOn = isOn; selectedToggle.isOn = isOn;
} }
}
else else
{ {
if (preSelectedToggle == null) if (preSelectedToggle == null)

View File

@@ -0,0 +1,61 @@
using System;
using TMPro;
using TriLibCore.SFB;
using UnityEngine;
using UnityEngine.UI;
using XRLib.UI;
namespace Studio
{
public class Panel_TopMenuNewProjectInfo : PanelBase
{
public TMP_InputField InputField_ProjectName;
public TMP_InputField InputField_ProjectRoute;
public Button Button_FileExplorer;
public Button Button_Create;
public Button Button_Cancel;
public Action onClickCreate;
public override void AfterAwake()
{
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
Button_Create.onClick.AddListener(OnClickCreate);
Button_Cancel.onClick.AddListener(Close);
}
private void OnClickFileExplorer()
{
var paths = StandaloneFileBrowser.OpenFolderPanel("Select Folder", "", false);
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
{
InputField_ProjectRoute.text = paths[0].Name;
}
}
private void OnClickCreate()
{
onClickCreate?.Invoke();
}
public void Open()
{
SetActive(true);
}
public void Close()
{
SetActive(false);
}
public string GetProjectName()
{
var name = InputField_ProjectName.text;
return name;
}
public string GetProjectRoute()
{
var route = InputField_ProjectRoute.text;
return route;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 30d2a39cb76a2a6428f6cf8d0348068f

View File

@@ -0,0 +1,56 @@
using System;
using TMPro;
using TriLibCore.SFB;
using UnityEngine;
using UnityEngine.UI;
using XRLib.UI;
namespace Studio
{
public class Panel_TopMenuOpenProjectInfo : PanelBase
{
public TMP_InputField InputField_ProjectName;
public TMP_InputField InputField_ProjectRoute;
public Button Button_FileExplorer;
public Button Button_Open;
public Button Button_Cancel;
public Action onClickOpen;
public override void AfterAwake()
{
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
Button_Open.onClick.AddListener(OnClickOpen);
Button_Cancel.onClick.AddListener(Close);
}
private void OnClickFileExplorer()
{
var paths = StandaloneFileBrowser.OpenFilePanel("Select Project", "", "ocs", false);
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
{
InputField_ProjectRoute.text = paths[0].Name;
}
}
private void OnClickOpen()
{
onClickOpen?.Invoke();
}
public void Open()
{
SetActive(true);
}
public void Close()
{
SetActive(false);
}
public string GetProjectRoute()
{
var route = InputField_ProjectRoute.text;
return route;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7defec43ad8d43745b87a1f6fe4da2f7