Skip to main content
Cleaning up inspector tag.
Link
Vaillancourt
  • 16.4k
  • 17
  • 55
  • 61
Tweeted twitter.com/#!/StackGameDev/status/596211576136409088
Source Link
return true
  • 942
  • 5
  • 16

Custom Editor - keep default look but add more

What I would like to know is if there is a easy way using OnInspectorGUI, to replace the inspector with one that includes just one or two additional fields (so that it looks identical to the non-custom editor, except for the addition of one or two fields at the end). It seems like such a bother to recreate every field manually when I just want to add one little thing - so perhaps this is already a thing.

Or is there any way to easily tell unity to do it's default drawing for a specific type of field? When I was playing with this before, I had to commit to exactly what was to be shown, and I would need to manually write each field out --- which is bothersome if the public fields in my class(s) change - and they do frequently during development.

tl;dr - is there any way to simulate the default behavior of the inspector in a custom editor?