• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Wild-Factor · Jul 06, 2015 at 08:05 PM · unity 5inspectornaming

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

alt text

(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

inspector-var-name.png (15.5 kB)
Comment

People who like this

0 Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DiegoSLTS · Jul 06, 2015 at 08:23 PM 0
Share

@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.

avatar image tanoshimi · Jul 07, 2015 at 08:17 AM 0
Share

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.

4 Replies

· Add your reply
  • Sort: 
avatar image

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.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

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:

alt text

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?


hungarian.png (2.6 kB)
Comment
starikcetin

People who like this

1 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image starikcetin · Jul 07, 2015 at 08:29 AM 0
Share

Thumbs up for direct explanation.

avatar image

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)

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

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)

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Collider population and animation events 0 Answers

How to organize Tags in the inspector? Unity 5 1 Answer

png file's inspector is blank! 0 Answers

Where can I find a complete list of Attributes and how they work and 2 Answers

Build auto id for any object in inspector 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges