该项目的目的是同时测试和演示来自 Unity DOTS 技术堆栈的多个新包。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

31 行
868 B

#if UNITY_EDITOR
using Unity.Animation;
using Unity.Entities;
using UnityEngine;
using UnityEditor.Animations;
public class AnimSourceDamageAuthoring : AnimSourceAuthoring, IConvertGameObjectToEntity
{
[Range(0f, 1f)]
public float Blend;
public BlendTree BlendTreeAsset;
public AnimationClip AdditiveRefPose;
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
dstManager.AddComponentData(entity, new AnimSource.Data());
var settings = new AnimSourceDamage.Settings
{
Blend = Blend,
AdditiveRefPose = ClipBuilder.AnimationClipToDenseClip(AdditiveRefPose),
};
BlendTreeEntityStoreHelper.AddBlendTree1DComponents(dstManager,entity, BlendTreeAsset);
dstManager.AddComponentData(entity, settings);
}
}
#endif