Hi,
I’m trying to make a custom curve editor for an asset. I can use CurveField, which uses AnimationCurve and has a nice Editor window. However, it seems to be stricted to single curve. Is there a solution for multiple curves, like in bottom image?
I did a little digging this morning. In the published UnityCsReference, UnityCsReference/Modules/ParticleSystemEditor/ParticleSystemModules/ModuleUIHelpers.cs has some interesting bits.
Such as, GUITripleMinMaxCurve, which appears to be the actual inspector field drawer. Between that function and SerializedMinMaxCurve.cs, that might be enough to get close enough for you to do your own field that behaves like the particle system’s do. (What with drawing the 3 little ‘micro’ curves that can be toggled.)
Downside to all of this, is all of that code is pretty dependant on other bits of internal classes, so cutting out the bits you want isn’t so easy. Upside is that, it looks like everything is there, so with enough time and effort you could reproduce most of it!
Multiple curves at once has been requested in the feedback sections. All indicating to me that, for now, Unity doesn’t have a super easy way. Yet. At least not as easy as the single AnimationCurve class.