Update editor

This commit is contained in:
2026-02-03 21:49:14 +09:00
parent 9fcf06dbe4
commit 59991f47d5
88 changed files with 1157 additions and 1288 deletions

View File

@@ -1,5 +1,5 @@
using CommunityToolkit.Mvvm.ComponentModel;
using Ghost.Data.Services;
using Ghost.Editor.Core;
using Ghost.Editor.Core.AssetHandle;
using Ghost.Editor.Models;
using System.Collections.ObjectModel;
@@ -36,12 +36,7 @@ internal partial class ProjectViewModel : ObservableObject
public ProjectViewModel()
{
if (ProjectService.CurrentProject.Metadata == null)
{
throw new InvalidOperationException("Current project is not set.");
}
var assetsRootItem = new ExplorerItem("Assets", Path.Combine(Path.GetDirectoryName(ProjectService.CurrentProject.Path)!, ProjectService.ASSETS_FOLDER), true);
var assetsRootItem = new ExplorerItem("Assets", Path.Combine(EditorApplication.CurrentProjectPath, EditorApplication.ASSETS_FOLDER_NAME), true);
LoadSubFolderRecursive(ref assetsRootItem);
SubDirectories.Add(assetsRootItem);