Serializing a Function in Unity using AnimationCurve
Hey there guys, I'm working on a game with Unity right now and I have a few classes which basically represent certain types of functions that I want to use in some contexts. What i would like to know is if there is a way to translate my functions into animation curves (ideally using a custom attribute such as
SerializeCurveAttribute
) so that I can use Unity's built-in serialization for said curves. I'm not quite sure how to go about this, as I've barely written any attributes, and the decompiled code for Unity's SerializeField
literally contains nothing.
Here is the code for my curve classes:
0 Replies