Unity3D 自动切割动画
生活随笔
收集整理的這篇文章主要介紹了
Unity3D 自动切割动画
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
模型太復雜,動畫幀數多,手動切割動畫Unity要卡死三分鐘……搜索發現以下解決方法
原文地址點擊這里
using UnityEngine; using System.Collections; using System.Collections.Generic;public static class AnimationClipConfig {public static bool isInit = false;public static List<modelST> modelList = new List<modelST>();public static void init(){if (isInit)return;isInit = true;modelST tempModel = new modelST();tempModel.ModelName = "name"; //模型名字 tempModel.clipSTs = new clipST[]{ new clipST("Step1" , 0, 20, false), new clipST("Step2" , 20, 40, false), new clipST("Step3" ,40, 70, false), new clipST("Step4" , 70, 90, false),};modelList.Add(tempModel);}#region STpublic class clipST{public string name;public int firstFrame;public int lastFrame;public bool isloop;public clipST(string _n, int _f, int _l, bool _i){name = _n;firstFrame = _f;lastFrame = _l;isloop = _i;}}public class modelST{public string ModelName;public clipST[] clipSTs;}#endregion }
總結
以上是生活随笔為你收集整理的Unity3D 自动切割动画的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【无标题】8421码,5421码,242
- 下一篇: 2021 Macbook Pro 14