CommonSettingsConfigurations.cpp 830 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include "CommonSettingsConfigurations.h"
  9. #include <AzCore/IO/FileIO.h>
  10. #include <AzCore/IO/Path/Path.h>
  11. #include <AzCore/Settings/SettingsRegistryMergeUtils.h>
  12. #include <AzToolsFramework/API/EditorAssetSystemAPI.h>
  13. namespace ScriptCanvasEditor
  14. {
  15. AZStd::string GetEditingGameDataFolder()
  16. {
  17. AZ::IO::Path projectPath;
  18. if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr)
  19. {
  20. settingsRegistry->Get(projectPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectPath);
  21. }
  22. return projectPath.Native();
  23. }
  24. }