Firstborn/Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/Utility/Extentions/AnimationCurveExtention.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

17 lines
453 B
C#

using UnityEngine;
namespace AwesomeTechnologies.Utility
{
public static class AnimationCurveExtention
{
public static float[] GenerateCurveArray(this AnimationCurve self, int sampleCount)
{
float[] returnArray = new float[sampleCount];
for (int j = 0; j <= sampleCount-1; j++)
returnArray[j] = self.Evaluate(j / (float)sampleCount);
return returnArray;
}
}
}