Asset explorer showing files

After loading a project the asset explorer now show all the project files.
This commit is contained in:
2022-11-11 13:10:05 +01:00
parent b5db500d48
commit 628225af45
5 changed files with 200 additions and 137 deletions

View File

@ -36,6 +36,7 @@ public:
double previous = glfwGetTime();
double lag = 0.0;
AssetManager::Init();
renderer->Prepare(activeRuntime.MainScene);
while (!mainWindow.WindowShouldClose())
@ -139,6 +140,8 @@ public:
switch (result) {
case(NFD_OKAY):
Project::LoadProject(path, activeRuntime.CurrentProject);
AssetManager::setAssetPath(activeRuntime.CurrentProject.get()->GetProjectDirectory());
AssetManager::BuildAssetView();
break;
case(NFD_CANCEL):
break;
@ -225,7 +228,7 @@ public:
switch (result) {
case(NFD_OKAY):
// Import Model
AssetManager::LoadFromSource(modelImportPath, ".");
AssetManager::LoadFromSource(modelImportPath, activeRuntime.CurrentProject.get()->GetProjectDirectory() / "Assets");
break;
case(NFD_CANCEL):
break;