• 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 KMKxJOEY1 · Jun 05, 2013 at 03:38 PM · charactercharactermotorcorruptedmotorcorrupt

Character Motor Script Corrupted

So my game has started crashing on loading a game play level ever since i updated to the 4.1.3 version. After many different tests and long frustrated hours on debugging I isolated the problem to disabling the character motor script (provided by unity in standard assets) and it started to work. Unfortunately the character motor script is essential so i cant think of a work around. Am i going to have to re-install an older version of unity?

Comment

People who like this

0 Show 6
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 Kirbyrawr · Jun 05, 2013 at 05:34 PM 0
Share

Reimport it.

avatar image ExTheSea · Jun 05, 2013 at 06:27 PM 0
Share

You have to create a new script copy all the code in the new one and delete the old one. Then use the new one instead.

http://answers.unity3d.com/questions/354053/unity-4-corrupted-files.html

avatar image KMKxJOEY1 · Jun 05, 2013 at 06:51 PM 0
Share

I would but this is a motor, not just a script. Meaning, it as global namespaces and the term CharacterMotor is recognized by unity and therefore where i have referenced it in other scripts like so: private var motor : CharacterMotor; cannot be changed to private var motor : newCharacterMotor;

if it was in C# i may be able to do that, but newCharacterMotor is not a recognizable type or namespace.

I even changed the FPSInput script to C# so i can reference newCharacterMotor, but it is a javascript so it wont recognize it

avatar image ExTheSea · Jun 05, 2013 at 07:10 PM 0
Share

You can just rename the existing one to oldCharacterMotor then make a new one and name it CharacterMotor (You could also just rename it after removing the old one). Also what do you mean by recognizable namespace? Every script and component can be used the same way in a script.

Yes it can be changed to newCharacterMotor if you called the script like that. The part which adds it to the Character Controller/Character Motor component which adds this script and the character controller is this line:

 @script AddComponentMenu ("Character/Character Motor")
avatar image KMKxJOEY1 · Jun 05, 2013 at 07:12 PM 0
Share

I've also just sat down and re done the entire charactermotor in C# but it has the same results, probably because of the name still

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by KMKxJOEY1 · Jun 06, 2013 at 11:27 AM

Solved, Re did the motor script in C#, renamed the script, class, and all reference calls in other scripts Was a pain but works

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

16 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Changing base jump height in CharacterMotor script 0 Answers

Help to understand script (Ninja character) 0 Answers

Increasing speed of Character Motor on collision help 2 Answers

Character motor script resets when I play 1 Answer

Character In Need Of Exorcism 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