- Home /
Upgrade to unity 5, Inspector change how it display variable name
ve just upgraded my project to Unity 5.
I've still one issue. Inspector don't display my variable name like they use to be. (of course changing my naming convention of 10 of thousands of code line is not a solution :) )
For a varibale "m_fGrabRange" it dispaly" F Grab Range" instead of "GrabRange" like in Unity 3 and 4.6
(Artist don't need to know the variable type)
How can I fix that ?
Previous suggestion: Replace var name (impossible thousand of var name) Using PropertyDrawer: need to make one te reaplace every var type (with enum/class etc.. it's also really heavy to do)
Thanks in advance for your help
@tanoshimi, he's using Hungarian notation, all variable names start with some caracters that specify the type of the variable itself (fSomething for float variables and so on), it's not a plugin, he wrote the variables that way.
Sorry - my last comment was not clear. I realise that the OP is using Hungarian notation. The point I was trying to make was concerning how the variable prefix was separated from the variable name itself.
Answer by tanoshimi · Jul 07, 2015 at 08:23 AM
Here's how I see the variable public float m_fGrabRange;
exposed in the inspector:
In other words, your artist has always been able to see the variable type, it's just that in some update Unity appears to be inserting an extra space between the type prefix and the name when displaying Hungarian-named variables, although I can't see this documented in the Release Notes. Does it really cause that much of a problem?
Answer by DiegoSLTS · Jul 06, 2015 at 08:20 PM
I'm not sure if this was intended or not on the Unity 5 version, maybe you should ask in the forum or create a ticket reporting it as bug, I'm not sure Unity devs use UnityAnswers.
Answer by Wild Factor · Jul 07, 2015 at 10:20 AM
I've reported the bug to Unity. Thanks for your help (I just wish unity let you configure the way var are displayed)
Answer by Wild Factor · Jul 07, 2015 at 12:13 PM
Hello tanoshimi, you're right, I've tried and there is the F already in previous version. It's just less readable now (more potential mistakes). I use propertydrawer to fix basic type (float, int and bool). But it's impossible for other type (It would need to make a propertydrawer for every new type of monobehaviour, enum etc..)
I've reported the bug to Unity. Thanks for your help (I just wish unity let you configure the way var are displayed)
Your answer
![](https://koobas.hobune.stream/wayback/20220611230054im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to assign script to inspector variable 2 Answers
How to change array orders in the inspector 1 Answer
No prompt to name animation 0 Answers
How to destroy particles from a given point in unity (In particle system inspector) 1 Answer
Unity Weird Inspector Layout Behavior: Can't Scroll To the Bottom of Component Fields 8 Answers