EditorGUILayout.CurveField

Hi,

I’m trying to make an editor window to display the slip curves for tyres and need to be able to view values outside of the range of what I’ve been given. The X-axis only plots values up to 1 and the Y-axis only plots to 40. Is there a way I can set the range to larger or negative numbers or automatically scale the axes labels to the data? My second question is regarding the popup curve editor (See pic below). Is it possible to embed the popup curve window in the main editor window rather than having to click it any time I want to see it in detail?

Thanks

As I have not used this “popup curve window” I do not know if this might be your problem, but in my experience when windows won’t dock first place to see is the ShowUtility();

If you instantiate your window by “newing” it up like so MyCurveEditor mce = new MyCurveEditor();mce.ShowUtility(); you will end up with an undockable window. If you use MyCurveEditor mce = EditorWindow.GetWindow(typeof(MyCurveEditor)); mce.ShowUtility(); you will get a dockable window.

But again, I can see from your screenshot your curveeditor is a dockable window ( and this is popup curve window is something I have never used) and you probably already knew this, but this happened to me once so I thought I’d share :smile:

Thanks for your reply. Fortunately I can dock the first window which is fine, but I’d like the curve window (the focused one in the screenshot) to be in the dockable window. At the moment I have to click on it to get the detailed version with the labeled axes etc which is annoying as I’d like to see it change in realtime when I drag the numbers around. I’ll keep trying!

Still stumped on finding the editor class for this one. Any ideas?