Method TextureFromCurve
TextureFromCurve(AnimationCurve, int)
Bakes an UnityEngine.AnimationCurve into a one-dimensional floating-point texture.
public static Texture2D TextureFromCurve(AnimationCurve curve, int resolution = 2048)
Parameters
curveAnimationCurveCurve to sample from left to right.
resolutionintNumber of texels to generate.
Returns
- Texture2D
A clamp-wrapped bilinear-filtered UnityEngine.Texture2D containing sampled curve values in all color channels.