WhiteBoxMeshAssetBus.h 1011 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. #pragma once
  9. #include <AzCore/Asset/AssetCommon.h>
  10. namespace WhiteBox
  11. {
  12. //! Notification bus for white box mesh asset modifications.
  13. class WhiteBoxMeshAssetNotifications : public AZ::EBusTraits
  14. {
  15. public:
  16. // EBusTraits overrides
  17. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
  18. using BusIdType = AZ::Data::AssetId;
  19. //! Raised when the asset has been modified.
  20. //! This is so other white box components referencing the same asset will know to update their render mesh.
  21. virtual void OnWhiteBoxMeshAssetModified([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset) {}
  22. };
  23. using WhiteBoxMeshAssetNotificationBus = AZ::EBus<WhiteBoxMeshAssetNotifications>;
  24. } // namespace WhiteBox