SceneSerializationHandler.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #pragma once
  9. #include <AzCore/Component/Component.h>
  10. #include <AzCore/std/containers/unordered_set.h>
  11. #include <AzCore/std/string/string.h>
  12. #include <SceneAPI/SceneCore/Events/SceneSerializationBus.h>
  13. namespace SceneBuilder
  14. {
  15. class SceneSerializationHandler
  16. : public AZ::Component
  17. , public AZ::SceneAPI::Events::SceneSerializationBus::Handler
  18. {
  19. public:
  20. AZ_COMPONENT(SceneSerializationHandler, "{5917845E-2A6A-4C6C-BD02-E9CECC8D4E13}", AZ::Component);
  21. SceneSerializationHandler() = default;
  22. ~SceneSerializationHandler() override = default;
  23. void Activate() override;
  24. void Deactivate() override;
  25. static void Reflect(AZ::ReflectContext* context);
  26. AZStd::shared_ptr<AZ::SceneAPI::Containers::Scene> LoadScene(
  27. const AZStd::string& sceneFilePath,
  28. AZ::Uuid sceneSourceGuid,
  29. const AZStd::string& watchFolder) override;
  30. };
  31. } // namespace SceneBuilder