diff --git a/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs b/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs index 3dfc65db7..9bfcdb6ce 100644 --- a/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs +++ b/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs @@ -2,9 +2,7 @@ using System.Collections.Generic; using System.Linq; using UnityEngine; -#if UNITY_EDITOR using UnityEditor; -#endif namespace UniGLTF @@ -24,7 +22,6 @@ namespace UniGLTF public Dictionary SamplerMap = new Dictionary(); } -#if UNITY_EDITOR public static List GetAnimationClips(Animation animation) { var clips = new List(); @@ -122,7 +119,6 @@ namespace UniGLTF Animation = new glTFAnimation(), }; -#if UNITY_5_6_OR_NEWER List curveDatum = new List(); foreach (var binding in AnimationUtility.GetCurveBindings(clip)) @@ -160,7 +156,7 @@ namespace UniGLTF } // 同一のsamplerIndexが割り当てられているcurveDataがある場合はそれを使用し、無ければ作る - var curveData = curveDatum.FirstOrDefault(x => x.SamplerIndex == samplerIndex); + var curveData = curveDatum.FirstOrDefault(x => x.SamplerIndex == samplerIndex); if (curveData == null) { curveData = new AnimationCurveData(AnimationUtility.GetKeyRightTangentMode(curve, 0), property, samplerIndex, elementCount); @@ -218,10 +214,8 @@ namespace UniGLTF keyframeIndex++; } } -#endif return animation; } -#endif - } - } \ No newline at end of file + } +}