Main.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /////////////////////////////////////////////////////////////////////////////
  9. //
  10. // Asset Importer Sandbox Plugin Instance Creation
  11. //
  12. /////////////////////////////////////////////////////////////////////////////
  13. #include "AssetImporterPlugin.h"
  14. #include <AzCore/PlatformIncl.h>
  15. #include <AzCore/Memory/SystemAllocator.h>
  16. PLUGIN_API IPlugin* CreatePluginInstance(PLUGIN_INIT_PARAM* pInitParam)
  17. {
  18. IEditor* editor = pInitParam->pIEditorInterface;
  19. SetIEditor(editor);
  20. ISystem* system = pInitParam->pIEditorInterface->GetSystem();
  21. ModuleInitISystem(system, "QtAssetImporter");
  22. return new AssetImporterPlugin(editor);
  23. }
  24. #if !defined(AZ_MONOLITHIC_BUILD)
  25. #if defined(AZ_PLATFORM_WINDOWS)
  26. HINSTANCE g_hInstance = 0;
  27. BOOL __stdcall DllMain(HINSTANCE hinstDLL, ULONG fdwReason, [[maybe_unused]] LPVOID lpvReserved)
  28. {
  29. if (fdwReason == DLL_PROCESS_ATTACH)
  30. {
  31. g_hInstance = hinstDLL;
  32. }
  33. return TRUE;
  34. }
  35. #endif
  36. #endif // !defined(AZ_MONOLITHIC_BUILD)