chore: sync editor worktree changes
This commit is contained in:
@@ -145,6 +145,40 @@ bool Application::RebuildScriptingAssemblies() {
|
||||
#endif
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
std::string Application::GetProjectLibraryRoot() const {
|
||||
return ::XCEngine::Resources::ResourceManager::Get().GetProjectLibraryRoot().CStr();
|
||||
}
|
||||
|
||||
bool Application::InitializeWindowRenderer(HWND hwnd) {
|
||||
RECT clientRect = {};
|
||||
if (!GetClientRect(hwnd, &clientRect)) {
|
||||
@@ -227,13 +261,13 @@ void Application::RenderEditorFrame() {
|
||||
|
||||
m_imguiBackend.BeginFrame();
|
||||
m_viewportHostService.BeginFrame();
|
||||
m_layerStack.onImGuiRender();
|
||||
m_layerStack.onUIRender();
|
||||
UpdateWindowTitle();
|
||||
ImGui::Render();
|
||||
m_windowRenderer.Render(
|
||||
m_imguiBackend,
|
||||
kClearColor,
|
||||
[this](const Rendering::RenderContext& renderContext) {
|
||||
[this](const Rendering::RenderContext& renderContext, const Rendering::RenderSurface&) {
|
||||
if (m_editorContext) {
|
||||
m_viewportHostService.RenderRequestedViewports(*m_editorContext, renderContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user