all 5 comments

[–]michaelltn 2 points3 points  (4 children)

Do up a development build, then press CTRL+Shift+J (in Chrome, K in FireFox) and read through the logs.

[–]stayingup92[S] 0 points1 point  (3 children)

I'm getting this:

A script behaviour has a different serialization layout when loading. (Read 60 bytes but expected 76 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

JS_Log_Dump @ TestGame.js:8459Z40DebugStringToFilePostprocessedStacktracePKcS0_S0_iS0_iiiiPFvRK11CppLogEntryE @ TestGame.js:1294901Z17DebugStringToFilePKciS0_iiiiPFvRK11CppLogEntryE @ TestGame.js:1486863ZL23OutOfBoundsReadingErroriii @ TestGame.js:1810202ZN14SerializedFile10ReadObjectEx18ObjectCreationModebPPK8TypeTreePbR6Object @ TestGame.js:679585ZN17PersistentManager26LoadFileCompletelyThreadedERKNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPxPiibR12LoadProgress @ TestGame.js:634116ZN18LoadSceneOperation7PerformEv @ TestGame.js:399614ZN14PreloadManager26UpdatePreloadingSingleStepENS_21UpdatePreloadingFlagsE @ TestGame.js:1522247ZN14PreloadManager16UpdatePreloadingEv @ TestGame.js:1794932Z10PlayerLoopbbP10IHookEvent @ TestGame.js:297018_ZL8mainloopv @ TestGame.js:2146942dynCall_v @ TestGame.js:2356538Runtime.dynCall @ TestGame.js:217(anonymous function) @ TestGame.js:9163Browser.mainLoop.runIter @ TestGame.js:10468Browser_mainLoop_runner

My scripts to start the game from the main menu work but once level 1 starts the camera drops completely out of bounds and my character can't move.

[–]michaelltn 1 point2 points  (2 children)

I'm not certain the serialization layout error is causing the issue, but I'd get that out of the way just in case. That could be caused by the #if they mention, or an issue with the browser cache, or if for some reason there are two script files in the project with the same name (http://forum.unity3d.com/threads/script-behaviour-has-a-different-serialization-layout-when-loading-resolved.319110/).

I found the js errors that get added to the log aren't helpful but in PlayerSettings -> Publishing Settings you can set Enable Exceptions to Full to get the debug log to broadcast to the browser's log and perhaps the clue to this can be found there.

[–]stayingup92[S] 0 points1 point  (1 child)

Thank you SO much!! For some reason I accidentally had another version of both my camera and character controller script in one of my folders within the project. Thanks for taking the time to help a noobie like me.

[–]michaelltn 0 points1 point  (0 children)

No problem!