- Home /
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?
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 ins$$anonymous$$d.
http://answers.unity3d.com/questions/354053/unity-4-corrupted-files.html
I would but this is a motor, not just a script. $$anonymous$$eaning, it as global namespaces and the term Character$$anonymous$$otor is recognized by unity and therefore where i have referenced it in other scripts like so: private var motor : Character$$anonymous$$otor; cannot be changed to private var motor : newCharacter$$anonymous$$otor;
if it was in C# i may be able to do that, but newCharacter$$anonymous$$otor is not a recognizable type or namespace.
I even changed the FPSInput script to C# so i can reference newCharacter$$anonymous$$otor, but it is a javascript so it wont recognize it
You can just rename the existing one to oldCharacter$$anonymous$$otor then make a new one and name it Character$$anonymous$$otor (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 newCharacter$$anonymous$$otor if you called the script like that. The part which adds it to the Character Controller/Character $$anonymous$$otor component which adds this script and the character controller is this line:
@script AddComponent$$anonymous$$enu ("Character/Character $$anonymous$$otor")
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
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