- Home /
Question by
JackMini36 · Aug 15, 2016 at 09:39 AM ·
c#unity5slidercustom-inspector
How can I have an editor Slider whose value can also be edited through the value textfield?
Hello,
I am creating a custom editor/inspector for one of my scripts. Everything works great so far, but I have a slider that I want to be able to edit through the value text field as well. Basically I want to have a slider to behave exactly like when [Range()] is added to a serialized variable in inspector.
I have searched a lot, but did not find a way to do that. I can never edit the value through the value text field when using a Editor Slider. This is what I use:
steeringManager.steeringBehaviours[i].priority = EditorGUILayout.Slider(steeringManager.steeringBehaviours[i].priority, 1f, 100f, GUILayout.Width(170));
Any ideas how to do this?
Thanks!
Comment