Custom Inspector

I am making a custom inspector for my script, but I have run into an issue.
Trying to link my GUI slider variable to the new inspector. But I can not find the right way to do it.

I thought with an Game object but says cant convert Game object to UnityEngine.UI.Slider
So any help would be great can this be done
Please and Thank You!

For inspectors you must use the GUI and GUILayout functions, not UnityEngine.UI ones

1 Like

Not sure how to implament it

playerstats.healthSlider = GUILayout.Silder(new GameObject("Health Slider"),typeof(GameObject));

The learn button is your friend. This should get your going… If not there is tons of tuts all over the net…

http://unity3d.com/learn/tutorials/modules/intermediate/live-training-archive/property-drawers-custom-inspectors

Got it Thanks @hpjohn