Introduce scene viewport overlay providers
This commit is contained in:
45
tests/editor/test_application_asset_cache_stub.cpp
Normal file
45
tests/editor/test_application_asset_cache_stub.cpp
Normal 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
|
||||
Reference in New Issue
Block a user