修改动画分帧工具的bug
This commit is contained in:
parent
cff16c54cf
commit
9201c7343a
@ -5,7 +5,6 @@ using System.Collections;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
|
|
||||||
public class FbxAnimListPostprocessor : MonoBehaviour
|
public class FbxAnimListPostprocessor : MonoBehaviour
|
||||||
@ -14,7 +13,7 @@ public class FbxAnimListPostprocessor : MonoBehaviour
|
|||||||
public static void SplitAnim()
|
public static void SplitAnim()
|
||||||
{
|
{
|
||||||
UnityEngine.Object obj = Selection.activeObject;
|
UnityEngine.Object obj = Selection.activeObject;
|
||||||
if( null != obj )
|
if (null != obj)
|
||||||
{
|
{
|
||||||
string assetPath = AssetDatabase.GetAssetPath(obj);
|
string assetPath = AssetDatabase.GetAssetPath(obj);
|
||||||
try
|
try
|
||||||
@ -69,13 +68,20 @@ public class FbxAnimListPostprocessor : MonoBehaviour
|
|||||||
}
|
}
|
||||||
if (match.Groups["loop"].Success)
|
if (match.Groups["loop"].Success)
|
||||||
{
|
{
|
||||||
clip.loop = match.Groups["loop"].Value == "loop";
|
if (match.Groups["loop"].Value == "loop")
|
||||||
|
{
|
||||||
|
clip.loop = true;
|
||||||
|
clip.wrapMode = WrapMode.Loop;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clip.loop = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (match.Groups["name"].Success)
|
if (match.Groups["name"].Success)
|
||||||
{
|
{
|
||||||
clip.name = match.Groups["name"].Value;
|
clip.name = match.Groups["name"].Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
List.Add(clip);
|
List.Add(clip);
|
||||||
|
|
||||||
match = regexString.Match(sAnimList, match.Index + match.Length);
|
match = regexString.Match(sAnimList, match.Index + match.Length);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user