- Home /
character controller quit working, script errors
Im just using the standard fps camera cylinder. everything has alwayse worked fine with it. this morning when i started up and try to build a game it wont do it. all three scripts have yellow exclamations .it says script cant be loaded pleas fix any compile errors and assin a valid script. i tried to reimport the thing but its the same. for the heck of it i went into the mouse script to see what kind of errors it was talkin about and it wanted me to add a | to this one part, boolien somethin lol, so no prob i did that and ran debug again and first line it says "warning will robinson namespace collections is never used BCW0016. how the heck did i screw up my cam?! i didnt mess with any thing...that i know of. it worked yesterday. i have v4. now id like to mention i did install a bunch of the free assets yesterday, i dont know if its related but i may or may not have hit something on that new antares drag up window..i mean i dont know any thing about it yet...did i unparent the cam from the cylender or something? to me that seems far fetched. if some one out there has any ideas to get me back to work befor i rip out my hair id owe ya big time! i dont usually like to post but i couldnt figure out how to ask the right question to get the answer i needed. thank you ....man , if i totally reimport the camera controller asset why oh why wont it work as it did befor ?! raa!! haha :P thanks again. i typed this once but it didnt post, forgive me if it does it twice now.
update
evedently i screwed something more up then that , none of the scripts work. rookie mistake im sure, im just gunna export my terains and start a new project! thanks any ways, sorry for wastin your time.
Danger Danger, Dr Smith is sabotaging the project! Chances are that you re-imported assets you already had, and when you re-import, the ones you had are overwritten. $$anonymous$$ake sure when the Import window comes up, you only check(tick) and import assets that are labelled as New in green on the right hand side.
Regarding the 3rd person controller script, that warning always comes up (why they didn't fix it is a mystery). Just double-click on the warning, and the script should open to the line with the typo (line 193). simply add a | right between the Inputs (|| means or) like this :
// Pick speed modifier
if (Input.Get$$anonymous$$ey ($$anonymous$$eyCode.LeftShift) || Input.Get$$anonymous$$ey ($$anonymous$$eyCode.RightShift))
the other thing is check your objects Inspector, if you see this where the script should be :
$$anonymous$$onoBehaviour
Script $$anonymous$$issing ($$anonymous$$ono Script)
then the script has been edited, moved or renamed outside of Unity (and Unity doesn't like that).
In summary, be very careful when importing assets, it is much better to import them into an empty new project, then check the assets there before importing in to your actual project (it doesn't need to download again, the package now lives somewhere in the Unity folders, so importing is very quick after the first time downloading). Then check you are not importing and overwriting assets you already have.
Your answer
Follow this Question
Related Questions
Object reference not set to instance of an object 2 Answers
Very Simple Left and Right Movement Script [OR] disable dravity on CharacterController? 2 Answers
Ball Character controlled by a single Joystick? 0 Answers
Character Controller Script 3 Answers
Character Controller Jittering Problem 2 Answers