EditorAudioPreloadComponent.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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/std/string/string.h>
  10. #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
  11. #include <AzToolsFramework/UI/PropertyEditor/PropertyAudioCtrlTypes.h>
  12. #include <IAudioInterfacesCommonData.h>
  13. #include "AudioPreloadComponent.h"
  14. namespace LmbrCentral
  15. {
  16. /*!
  17. * EditorAudioPreloadComponent
  18. */
  19. class EditorAudioPreloadComponent
  20. : public AzToolsFramework::Components::EditorComponentBase
  21. {
  22. public:
  23. AZ_EDITOR_COMPONENT(EditorAudioPreloadComponent, "{58E20F92-2228-4A90-97AB-28DB34BAF0EE}",
  24. AzToolsFramework::Components::EditorComponentBase);
  25. EditorAudioPreloadComponent();
  26. void BuildGameEntity(AZ::Entity* gameEntity) override;
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  28. {
  29. LmbrCentral::AudioPreloadComponent::GetProvidedServices(provided);
  30. }
  31. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  32. {
  33. LmbrCentral::AudioPreloadComponent::GetRequiredServices(required);
  34. }
  35. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  36. {
  37. LmbrCentral::AudioPreloadComponent::GetIncompatibleServices(incompatible);
  38. }
  39. static void Reflect(AZ::ReflectContext* context);
  40. private:
  41. //! Serialized data
  42. AzToolsFramework::CReflectedVarAudioControl m_defaultPreload;
  43. AudioPreloadComponent::LoadType m_loadType = AudioPreloadComponent::LoadType::Auto;
  44. };
  45. } // namespace LmbrCentral