您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

42 行
837 B

using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
namespace Unity.DemoTeam.DigitalHuman
{
[Serializable]
public class SkinDeformationPlayableAsset : PlayableAsset, ITimelineClipAsset
{
public SkinDeformationClip clip;
public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
{
var playable = ScriptPlayable<SkinDeformationPlayable>.Create(graph);
var playableBehaviour = playable.GetBehaviour();
{
playableBehaviour.clip = clip;
}
return playable;
}
public ClipCaps clipCaps
{
get
{
return ClipCaps.Blending | ClipCaps.ClipIn | ClipCaps.Extrapolation | ClipCaps.SpeedMultiplier;
}
}
public override double duration
{
get
{
if (clip != null)
return clip.Duration;
else
return 3.0;
}
}
}
}