I came to a wired situation: I can play my game within Unity and build it. But when I play the built game, it remains to be a still image, which is what the main camera is looking at in the very beginning. How does it happen? Any suggestion?
PS: The most recent action I did is adding animation in the scene.
you are probably not including the desired scene in your build settings so when it generates the standalone or webplayer it’s using that scene you are describing.
That is the most confusing part I would describe: I have built the early versions of this scene, everything is OK (I can played the built game), then I added some scripts/boats/docks to the scene, I rebuild it, the game just does not work, and I have only this scene, which is added to the game.
Later on, I recreated a simple version of this game by creating a new project, and copied (no modification) the necessary assets to this new project from the wired previous project. Then the new project works fine - I can play the built game. But you know, the “still image” problem is still not solved.
I don’t want to leave this problem unsolved, who knows when this problem reoccurs? I just wonder maybe some setting of Unity was modified accidentally but I did not notice it and do not know where I can change it back.
I built a windows version and checked the output_log file and found the problems, one of the similar errors is:
Couldn’t load the script"“ThirdPersonController” because its file name doesn’t match the class name.
Please make sure the file name of the script is the same as the class defined inside it.
(Filename: \unitybuild\unity\Runtime\Mono\Monoscript.cpp Line: 382)
Actually all these scripts are written in JavaScript with no class. How the class name comes from?
Thanks ratamorph for your reply. I’ve checked my code and there is no C# code there. Apparently I use “thirdpersoncontroller” from the Unity which is written in JavaScript, and this file is also reported as “class name error” something.
Actually I am not very sure of the errors by Unity.
So I recreated a new project, and added my necessary files, removed some test codes. Then I can build it and play it. That’s the way how I solved my problem though I do not know what happened to my old project.