- Home /
Inspector editable animation curves (without animation curve class please)
Is there a way to get curves that I can edit in the inspector similar to setting the line width for the line renderer? I.e. an editable curve that sits in and is edited through the inspector as opposed to opening a new window.
I know that animation curves are out there (and that is what I am currently using) but I don't like how ill-defined and hard to read the numbers on the graph are when I open it up to edit, dark grey numbers on a slightly less dark background is a terrible choice.
Additionally, I want to be able to just set the height of the graph by typing it in. With animation curves I have to drag a key frame to the hard-to-read Y value I want (I am working with eulerAngles might I add, so those numbers are going to be far beyond 0 and 1).
Lastly I would like to avoid having to make my own custom editor for this if I can, really hoping there is some other class or attribute I can add to my script to get this really easily.
Thanks for taking the time to read/respond.
Answer by mansoor090 · Mar 17, 2020 at 06:35 AM
You can search for Easing Functions To understand them in a better way - https://easings.net/en - https://gist.github.com/cjddmut/d789b9eb78216998e95c
Answer by iuridosanjos · May 13 at 05:55 AM
I know that you're saying to not talk about AnimationCurve, but I've found a way to clamp what is shown in the editor and it was really good for my case as I wanted only a Rect of 0-1 values on X and Y.
Source: https://forum.unity.com/threads/changing-how-animation-curve-window-looks.488841/
BTW, I was looking for a way to show the curve editor inside the Inspector. Haven't find a way yet, guess it's not possible.
Your answer
Follow this Question
Related Questions
Custom Inspector - Accessing AnimationCurve 1 Answer
Inspector turns black on refresh 4 Answers
What should be handled in the custom inspector version of a script? 1 Answer
Need help with editor script to copy animation data into individual curves 1 Answer
How to specify the rotation angle in degrees, in the inspector? 2 Answers