MotionSetAssetFactory.h 778 B

1234567891011121314151617181920212223242526272829
  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. #include <Integration/Assets/MotionSetAsset.h>
  11. namespace EMotionFX
  12. {
  13. class MotionSet;
  14. class MotionSetAssetFactory
  15. {
  16. public:
  17. static AZ::Data::Asset<EMotionFX::Integration::MotionSetAsset> Create(const AZ::Data::AssetId id, MotionSet* motionSet)
  18. {
  19. auto asset = AZ::Data::AssetManager::Instance().CreateAsset<EMotionFX::Integration::MotionSetAsset>(id);
  20. asset->SetData(motionSet);
  21. return asset;
  22. }
  23. };
  24. } // namespace EMotionFX