LegacyToHumanoidAnimationClipMapper.cs 1.1 KB

12345678910111213141516171819202122232425
  1. using System;
  2. using UnityEngine;
  3. namespace TriLibCore.Mappers
  4. {
  5. /// <summary>Represents a Mapper that converts legacy Animation Clips into humanoid Animation Clips.</summary>
  6. [CreateAssetMenu(menuName = "TriLib/Mappers/Animation Clip/Legacy To Humanoid Animation Clip Mapper", fileName = "LegacyToHumanoidAnimationClipMapper")]
  7. [Obsolete("This mapper is not used anymore as Unity does not support runtime Generic AnimationClips creation")]
  8. public class LegacyToHumanoidAnimationClipMapper : AnimationClipMapper
  9. {
  10. /// <summary>
  11. /// Template mecanim animation clip.
  12. /// Unity runtime API can't access mecanim animation clip settings as root motion baking, animation loop mode, etc.
  13. /// So we get these settings from the template animation clip.
  14. /// </summary>
  15. public AnimationClip MecanimAnimationClipTemplate;
  16. /// <inheritdoc/>
  17. public override AnimationClip[] MapArray(AssetLoaderContext assetLoaderContext, AnimationClip[] sourceAnimationClips)
  18. {
  19. return sourceAnimationClips;
  20. }
  21. }
  22. }