diff --git a/SHADE_Engine/src/Assets/SHAssetMacros.h b/SHADE_Engine/src/Assets/SHAssetMacros.h index 3376a2d5..336db566 100644 --- a/SHADE_Engine/src/Assets/SHAssetMacros.h +++ b/SHADE_Engine/src/Assets/SHAssetMacros.h @@ -56,7 +56,7 @@ enum class AssetType : AssetTypeMeta constexpr size_t TYPE_COUNT{ static_cast(AssetType::MAX_COUNT) }; //Directory -#ifdef _PUBLISH +#ifndef _PUBLISH constexpr std::string_view ASSET_ROOT{ "Assets" }; constexpr std::string_view BUILT_IN_ASSET_ROOT {"Built_In"}; #else diff --git a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp index c3c7ef03..59d3f632 100644 --- a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp +++ b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp @@ -79,10 +79,10 @@ namespace SHADE //SHResourceManager::LoadAllAudio(system, soundList); - LoadBank("../../Assets/Audio/Master.bank"); - LoadBank("../../Assets/Audio/Master.strings.bank"); + LoadBank("Assets/Audio/Master.bank"); + LoadBank("Assets/Audio/Master.strings.bank"); //LoadBank("../../Assets/Audio/Music.bank"); - LoadBank("../../Assets/Audio/footsteps.bank"); + LoadBank("Assets/Audio/footsteps.bank"); //auto clip = CreateAudioClip("event:/Characters/sfx_footsteps_human"); //clip->Play(); diff --git a/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp b/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp index 06c0c2ae..1298f168 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp @@ -38,7 +38,7 @@ namespace SHADE void SHEditorMenuBar::Init() { SHEditorWindow::Init(); - constexpr std::string_view path = "../../Assets/Editor/Layouts"; + constexpr std::string_view path = "Assets/Editor/Layouts"; for(auto const& entry : std::filesystem::directory_iterator(path)) { layoutPaths.push_back(entry.path()); @@ -77,11 +77,11 @@ namespace SHADE { if(ImGui::Selectable("Save")) { - SHSerialization::SerializeSceneToFile("../../Assets/Scenes/Test.SHADE"); + SHSerialization::SerializeSceneToFile("Assets/Scenes/Test.SHADE"); } if(ImGui::Selectable("Load")) { - SHSerialization::DeserializeSceneFromFile("../../Assets/Scenes/Test.SHADE"); + SHSerialization::DeserializeSceneFromFile("Assets/Scenes/Test.SHADE"); } ImGui::EndMenu(); } diff --git a/SHADE_Engine/src/Editor/SHEditor.cpp b/SHADE_Engine/src/Editor/SHEditor.cpp index 6974d213..9972066c 100644 --- a/SHADE_Engine/src/Editor/SHEditor.cpp +++ b/SHADE_Engine/src/Editor/SHEditor.cpp @@ -102,7 +102,11 @@ namespace SHADE io->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls io->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; //Enable for Multi-Viewports io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; //Enable docking +#ifndef _PUBLISH + io->IniFilename = "Assets/Editor/Layouts/UserLayout.ini"; +#else io->IniFilename = "../../Assets/Editor/Layouts/UserLayout.ini"; +#endif io->ConfigWindowsMoveFromTitleBarOnly = true; InitLayout(); @@ -176,20 +180,20 @@ namespace SHADE { if(!std::filesystem::exists(io->IniFilename)) { - std::filesystem::copy_file("../../Assets/Editor/Layouts/Default.ini", io->IniFilename); + std::filesystem::copy_file("Assets/Editor/Layouts/Default.ini", io->IniFilename); } //eventually load preferred layout here } void SHEditor::InitFonts() noexcept { - ImFont* mainFont = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/Segoe UI.ttf", 20.f);//TODO: Change to config based assets path + ImFont* mainFont = io->Fonts->AddFontFromFileTTF("Assets/Editor/Fonts/Segoe UI.ttf", 20.f);//TODO: Change to config based assets path ImFontConfig icons_config{}; icons_config.MergeMode = true; icons_config.GlyphOffset.y = 5.f; constexpr ImWchar icon_ranges_fa[] = { ICON_MIN_FA, ICON_MAX_FA, 0 }; - ImFont* UIFontFA = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/fa-solid-900.ttf", 20.f, &icons_config, icon_ranges_fa); //TODO: Change to config based assets path + ImFont* UIFontFA = io->Fonts->AddFontFromFileTTF("Assets/Editor/Fonts/fa-solid-900.ttf", 20.f, &icons_config, icon_ranges_fa); //TODO: Change to config based assets path constexpr ImWchar icon_ranges_md[] = { ICON_MIN_MD, ICON_MAX_16_MD, 0 }; - ImFont* UIFontMD = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/MaterialIcons-Regular.ttf", 20.f, &icons_config, icon_ranges_md); //TODO: Change to config based assets path + ImFont* UIFontMD = io->Fonts->AddFontFromFileTTF("Assets/Editor/Fonts/MaterialIcons-Regular.ttf", 20.f, &icons_config, icon_ranges_md); //TODO: Change to config based assets path io->Fonts->Build(); } diff --git a/SHADE_Engine/src/Scripting/SHScriptEngine.cpp b/SHADE_Engine/src/Scripting/SHScriptEngine.cpp index 4a73342e..5a09b646 100644 --- a/SHADE_Engine/src/Scripting/SHScriptEngine.cpp +++ b/SHADE_Engine/src/Scripting/SHScriptEngine.cpp @@ -32,7 +32,11 @@ namespace SHADE /* Static Definitions */ /*----------------------------------------------------------------------------------*/ const std::string SHScriptEngine::DEFAULT_CSHARP_NAMESPACE = std::string("SHADE"); - const std::string SHScriptEngine::CSPROJ_DIR = "..\\..\\TempScriptsFolder"; + #ifndef _PUBLISH + const std::string SHScriptEngine::CSPROJ_DIR = "TempScriptsFolder"; + #else + const std::string SHScriptEngine::CSPROJ_DIR = "..\\..\\TempScriptsFolder"; + #endif const std::string SHScriptEngine::CSPROJ_PATH = std::string(CSPROJ_DIR) + "\\SHADE_Scripting.csproj"; /*-----------------------------------------------------------------------------------*/ @@ -264,6 +268,7 @@ namespace SHADE \n\ ..\\bin\\Debug\\SHADE_Managed.dll\n\ ..\\bin\\Release\\SHADE_Managed.dll\n\ + SHADE_Managed.dll\n\ \n\ \n\ ..\\bin\\Debug\\SHADE_CSharp.dll\n\