Hi,
I using a custom editor script, and want to modify two variables at the same time using a minmaxslider.
Here’s the code for the line I’m using:
EditorGUILayout.MinMaxSlider(target.elementArray_.randomYFOstart, target.elementArray*.randomYFOend, 0.0, 1.0);*_
Both of the first two things are variables from an array of objects, but I get the following error code:
No appropriate version of ‘UnityEditor.EditorGUILayout.MinMaxSlider’ for the argument list ‘(System.Object, System.Object, float, float)’ was found.
I don’t understand why Unity thinks those first two things are System.Object when they are defined and set up as float variables in the main script this editor script refers to.
I have loads of other variables, set up in the same way, feeding perfectly into the editor script as IntSliders, Sliders, TextFields etc. etc.
What am I doing wrong?
I read on here (in the only other question relating to minmaxsliders) that in C# you need to add ‘ref’ to the beginning of the first two items, but that confuses the hell out of Unity.
Anyone help me?
Thanks!