UnsafeAnimationCurve
UnsafeListを使ってカーブを保持・評価します。割り当てに使うAllocatorを指定し、利用後にDisposeします。
public unsafe struct UnsafeAnimationCurve : IDisposableNativeAnimationCurve.cs · L49メンバー
IsCreated
カーブのネイティブ領域が割り当てられているかを返します。
public readonly bool IsCreated { get; }UnsafeAnimationCurve
指定したAllocatorでカーブを作ります。AnimationCurveを渡す形式では、そのキーとWrapModeをコピーします。
public UnsafeAnimationCurve(AllocatorManager.AllocatorHandle allocator)引数
allocatorAllocatorManager.AllocatorHandleネイティブ領域に使用するアロケーター。
public UnsafeAnimationCurve(AnimationCurve animationCurve, AllocatorManager.AllocatorHandle allocator)引数
animationCurveAnimationCurveカーブのキーと前後のWrapModeを含むUnityのAnimationCurve。allocatorAllocatorManager.AllocatorHandleネイティブ領域に使用するアロケーター。
CopyFrom
既存のカーブデータを渡したAnimationCurveのキーとWrapModeで更新します。
public void CopyFrom(AnimationCurve animationCurve)引数
animationCurveAnimationCurveカーブのキーと前後のWrapModeを含むUnityのAnimationCurve。
public void CopyFrom(in UnsafeAnimationCurve animationCurve)引数
animationCurvein UnsafeAnimationCurveカーブのキーと前後のWrapModeを含むUnityのAnimationCurve。
Evaluate
指定した時刻でキーとWrapModeを評価してfloatを返します。
public float Evaluate(float time)引数と戻り値
timefloatカーブを評価する時刻。- 戻り値
float
Dispose
カーブ用に確保したネイティブ領域を解放します。
public void Dispose()
MeatMotion