Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Eyeshock · Jan 23, 2013 at 02:52 AM · buginspectorbuild-errorfloatunity4

Unity4 Ignoring Inspector/Initialized Public Value in Build

I currently use a controller.move call, multiplied by a moveSpeed float and Time.Deltatime. This call works perfectly in Unity 3.5.6 and all earlier versions I utilized (in both editor and build) & Unity 4 Editor Game Window. However, as you can see below: the problems begin when I build my project.

Click here for Screenshot (Unity Support Forum Post):

I originally had moveSpeed initialized at 5f, and that would be replaced by the public inspector value (as different entities move at different speeds). Unfortunately, Unity4 builds ignore moveSpeed initialization and public inspector value entirely. There is no where in this code where the value is every set (it is only multiplied against values like sprintMultiplier). Additionally, the only workaround I have found is to 'hard-code' the moveSpeed to 5 in the Actions call.

The real problem with nailing down this problem, is that it DOES NOT OCCUR IN THE EDITOR. If you notice, I had to use the game-console window to output Debug.Log statements because I cannot recreate this bug in Unity4 builds.

If anyone has a solution or insight on what I might be doing wrong, or if this is a known error; I would really appreciate it, as this is single handedly keeping me from updating to Unity 4 atm. (well, maybe not by itself; there's some really crappy frame rates associated with OnTriggerEnter...but that's a whole other beast.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Wolfram · Jan 23, 2013 at 12:03 PM

Try renaming the variable, there might be some corruption in the script's metadata.

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

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error with my float variable? 1 Answer

Game works fine in editor, but build fails with 59 error in the console 2 Answers

Unity pro 4, shadow problems 0 Answers

Unity Editor's Inspector Glitch while using OnGUI function 0 Answers

transform.position = new Vector 3 NOT moving to correct position? 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