Simple Waypoint System的使用与其动画录制*
simple waypoint system
的使用教程链接https://blog.csdn.net/qq_34937637/article/details/82835667
网盘的下载地址:链接:
https://pan.baidu.com/s/1jOJ8wutDG8rAPu1C3ai5TA
提取码:hja0
注意的是 这个插件最后好用unity2018版本的
关于动画的录制
注意一点 GameObjectRecorder只有在uniy2018中能引用到,所以最好用unity2018版本的
具体步骤:
**创建GameObjectRecorder类型的实例。
调用GameObjectRecorder实例的方法 BindComponentOfType(GameObject , )绑定需要录制的组件,然后调用TakeSnapshot(Time.deltaTime),进行录制。这里要注意GameObject参数是录制Clip的根节点,如果要录制的动画层级很多,一定要把这个参数设为根节点。不然录制的Clip层级不对。
调用GameObjectRecorder实例的方法SaveToClip(AnimationClip),把绑定的帧存储在Clip中。
代码如下:
(GameObjectRecorder)需要用到unity2018
using UnityEngine;
using UnityEditor.Animations;
public class RecordTransformHierarchy : MonoBehaviour
{
public AnimationClip clip;
private GameObjectRecorder m_Recorder;
void Start()
{
// Create recorder and record the script GameObject.
m_Recorder = new GameObjectRecorder(gameObject);
// Bind all the Transforms on the GameObject and all its children.
//这里的Bind操