3
0

Launcher_Apple.mm 750 B

123456789101112131415161718192021222324252627282930
  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 "Launcher_Apple.h"
  9. #include <AzCore/IO/SystemFile.h> // for AZ_MAX_PATH_LEN
  10. #include <Foundation/Foundation.h>
  11. namespace O3DELauncher
  12. {
  13. const char* GetAppResourcePath()
  14. {
  15. static char pathToAssets[AZ_MAX_PATH_LEN] = { 0 };
  16. if (pathToAssets[0] == 0)
  17. {
  18. const char* pathToResources = [[[NSBundle mainBundle] resourcePath] UTF8String];
  19. azsnprintf(pathToAssets, AZ_MAX_PATH_LEN, "%s/%s", pathToResources, "assets");
  20. }
  21. return pathToAssets;
  22. }
  23. }