chore: snapshot editor work and restore tests

Key points:\n- restore the tests tree removed by bc47e6e\n- capture current editor workspace, scene, and docs reshuffle changes\n- keep local cloud.nvdb resources ignored from this commit
This commit is contained in:
2026-04-25 22:11:47 +08:00
parent 9ab1beb2c4
commit 12b71a319f
911 changed files with 3518184 additions and 1823 deletions

View File

@@ -0,0 +1,45 @@
#include "Application.h"
#include <XCEngine/Core/Asset/ResourceManager.h>
#ifdef XCENGINE_ENABLE_MONO_SCRIPTING
#include <XCEngine/Scripting/Mono/MonoScriptRuntime.h>
#endif
namespace XCEngine::Editor {
Application& Application::Get() {
alignas(Application) static unsigned char storage[sizeof(Application)] = {};
return *reinterpret_cast<Application*>(storage);
}
bool Application::CanReimportProjectAsset(const std::string& assetPath) const {
if (assetPath.empty()) {
return false;
}
return ::XCEngine::Resources::ResourceManager::Get().CanReimportProjectAsset(assetPath.c_str());
}
bool Application::ReimportProjectAsset(const std::string& assetPath) {
if (assetPath.empty()) {
return false;
}
auto& resourceManager = ::XCEngine::Resources::ResourceManager::Get();
resourceManager.Initialize();
return resourceManager.ReimportProjectAsset(assetPath.c_str());
}
bool Application::ReimportAllProjectAssets() {
auto& resourceManager = ::XCEngine::Resources::ResourceManager::Get();
resourceManager.Initialize();
return resourceManager.RebuildProjectAssetCache();
}
bool Application::ClearProjectLibrary() {
auto& resourceManager = ::XCEngine::Resources::ResourceManager::Get();
resourceManager.Initialize();
return resourceManager.ClearProjectLibraryCache();
}
} // namespace XCEngine::Editor