Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • 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
0
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
Add comment · 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
1

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
Add comment · 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
0

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
Add comment · 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
0

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
Add comment · 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
0

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
Add comment · 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.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

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


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