SandboxAPI.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. // Description : Main header included by every file in Editor.
  9. #ifndef CRYINCLUDE_EDITOR_INCLUDE_SANDBOXAPI_H
  10. #define CRYINCLUDE_EDITOR_INCLUDE_SANDBOXAPI_H
  11. #pragma once
  12. #include <AzCore/PlatformDef.h>
  13. #if defined(SANDBOX_API) || defined(CRYEDIT_API)
  14. #error SANDBOX_API and CRYEDIT_API should only be defined in this header. Use SANDBOX_EXPORTS and SANDBOX_IMPROTS to control it.
  15. #endif
  16. #if defined(SANDBOX_IMPORTS) && defined(SANDBOX_EXPORTS)
  17. #error SANDBOX_EXPORTS and SANDBOX_IMPORTS cannot be defined at the same time
  18. #endif
  19. #if defined(SANDBOX_EXPORTS)
  20. // Editor.exe case
  21. #define CRYEDIT_API AZ_DLL_EXPORT
  22. #define SANDBOX_API AZ_DLL_EXPORT
  23. #elif defined(SANDBOX_IMPORTS)
  24. // Sandbox plugins that rely on/extend Editor types.
  25. #define CRYEDIT_API AZ_DLL_IMPORT
  26. #define SANDBOX_API AZ_DLL_IMPORT
  27. #else
  28. // Standalone plugins that use Editor plugins.
  29. #define CRYEDIT_API
  30. #define SANDBOX_API
  31. #endif
  32. #endif // CRYINCLUDE_EDITOR_INCLUDE_SANDBOXAPI_H