Quantcast
Viewing all articles
Browse latest Browse all 48

How do I show a custom dynamic string instead of the script name of a MonoBehaviour component in the Inspector?

Hi everyone, I'd like to replace the Labels with the script names with custom strings taken from a field inside a script MonoBehaviour. I have a situation where several components from similar classes could be present on the same gameobject and this is rather confusing when inspecting them when inside a list of MonoBehaviours, and when collapsing the scripts. In short, in this image: ![asd](http://i.imgur.com/FC71J0d.png "") I'd like to show the contents of the **Name** field instead of the very first line "**Action Show Overlay (Script)**" I've seen people using or naming attributes I wasn't aware of, such as [Display(FormatMethod = "FormatBehaviour")], (https://github.com/vexe/VFW/issues/27) for which I can't find any documentation for, so I was wondering if some hidden or obscure way to rename not just the first script component but each one in the image would be possible.

Viewing all articles
Browse latest Browse all 48

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>