Expose UnityEngine.Keyframe properties and Keyframe[] Get/Set methods to Udon
Varneon
Udon is extremely slow and many creators heavily rely on AnimationCurves to optimize their programs, allowing them to evaluate complex curves with very minimal performance impact instead of writing the mathematical equations manually, resulting in orders of magnitude more instructions in the UdonAssembly.
AnimationCurve
class has already been fully exposed to Udon (thank you!)
and they can be constructed from a Keyframe
array, but none of the Keyframe
properties or the Keyframe[]
Get/Set methods are exposed to Udon, something that is needed to actually manipulate the keyframes of an AnimationCurve
.Allowing the modification of individual keyframes unlocks many use cases, such as adjusting a car engine's torque curve as a result of aftermarket modifications or adjusting input lookup tables to allow users to fine tune thumbstick input sensitivity to match their preferences, not only that, developing a complete director mode for worlds would become trivial, something that would allow users to create complex timelines for recording videos.
There are some possible workarounds using AnimationCurve.AddKey(Single, Single), but it is very inconvenient and severely limits more specific solutions where singular keyframes must be modified based on their original properties and we don't have a way of accessing the original time value of a keyframe before replacing it.
I have attached images of several examples where AnimationCurves are being used and I would like to be able to modify the individual keyframes of.
Log In