概要
using UnityEngine; public class Example : MonoBehaviour { public AnimationCurve m_curve1 = AnimationCurve.Constant( 0, 1, 0.5f ); public AnimationCurve m_curve2 = AnimationCurve.Linear( 0, 0, 1, 1 ); public AnimationCurve m_curve3 = AnimationCurve.EaseInOut( 0, 0, 1, 1 ); }
- AnimationCurve.Constant
- AnimationCurve.Linear
- AnimationCurve.EaseInOut
これらの関数を使用することで
AnimationCurve を指定したパラメータで初期化できます
参考ツイート様
Ever ran into the issue that your animation curves are not initialized/set up in the inspector by default?
— Rainer Angermann (@rangermann) 2018年12月4日
Here is how to create reasonable default values.#gamedev #unitytips #unity3d pic.twitter.com/72CnUE53NR