diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp index c9ab5a135e..b21c008353 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -540,11 +541,10 @@ namespace AudioControls } //-------------------------------------------------------------------------------------------// - AZStd::string CAudioSystemEditor_wwise::GetDataPath() const + AZ::IO::FixedMaxPath CAudioSystemEditor_wwise::GetDataPath() const { - AZStd::string path(Path::GetEditingGameDataFolder()); - AZ::StringFunc::Path::Join(path.c_str(), "sounds/wwise_project/", path); - return path; + auto projectPath = AZ::IO::FixedMaxPath{ AZ::Utils::GetProjectPath() }; + return (projectPath / "sounds" / "wwise_project"); } } // namespace AudioControls diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h index ee7b54217d..e2a9fdf5d7 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h @@ -86,7 +86,7 @@ namespace AudioControls const AZStd::string_view GetTypeIcon(TImplControlType type) const override; const AZStd::string_view GetTypeIconSelected(TImplControlType type) const override; AZStd::string GetName() const override; - AZStd::string GetDataPath() const; + AZ::IO::FixedMaxPath GetDataPath() const override; void DataSaved() override {} void ConnectionRemoved(IAudioSystemControl* control) override; ////////////////////////////////////////////////////////// diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp index 074e25d39a..3f2aac2b98 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp @@ -54,12 +54,12 @@ namespace AudioControls void CAudioWwiseLoader::Load(CAudioSystemEditor_wwise* audioSystemImpl) { m_audioSystemImpl = audioSystemImpl; - const AZStd::string wwiseProjectFullPath(m_audioSystemImpl->GetDataPath()); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::GameParametersFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::GameStatesFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::SwitchesFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::EventsFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::EnvironmentsFolder); + const AZ::IO::FixedMaxPath wwiseProjectFullPath{ m_audioSystemImpl->GetDataPath() }; + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::GameParametersFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::GameStatesFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::SwitchesFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::EventsFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::EnvironmentsFolder }.Native()); LoadSoundBanks(Audio::Wwise::GetBanksRootPath(), "", false); } diff --git a/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h b/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h index ac2bc8c0b8..0ccd1390af 100644 --- a/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h +++ b/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h @@ -14,6 +14,7 @@ #pragma once #include +#include #include #include @@ -151,7 +152,7 @@ namespace AudioControls //! Gets the folder where the implementation specific controls data are stored. //! This is used by the ACE to update if controls are changed while the editor is open. //! @return String with the path to the folder where the implementation specific controls are stored. - virtual AZStd::string GetDataPath() const = 0; + virtual AZ::IO::FixedMaxPath GetDataPath() const = 0; //! Informs the plugin that the ACE has saved the data in case it needs to do any clean up. virtual void DataSaved() = 0; diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp index 7e3528362e..68d5a30af9 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp @@ -218,7 +218,7 @@ namespace AudioControls IAudioSystemEditor* pAudioSystemImpl = CAudioControlsEditorPlugin::GetAudioSystemEditorImpl(); if (pAudioSystemImpl) { - StartWatchingFolder(pAudioSystemImpl->GetDataPath()); + StartWatchingFolder(pAudioSystemImpl->GetDataPath().LexicallyNormal().Native()); m_pMiddlewareDockWidget->setWindowTitle(QString(pAudioSystemImpl->GetName().c_str()) + " Controls"); } }