- Home /
Blank result from build and run
I've created a scene with only an empty GameObject in the hierarchy, which has a script component that loads everything for the game. The game works fine by clicking the play button, but build and run just gives me a blank (ie blue) screen. I've tried adding a cube to the scene at the area where the camera would be looking, but it appears to be a problem with the camera I created through the script.
Answer by maggot · Nov 16, 2011 at 12:51 PM
Alright, I have got it working now. It was a problem with script execution order. It works both in the game window and in build and run.
Answer by syclamoth · Oct 30, 2011 at 10:38 AM
Make sure that you've got the correct scene as 'scene 0' in your list of scenes to build. It doesn't automatically add the one you are currently in- you have to do it manually.
Answer by maggot · Oct 30, 2011 at 11:10 AM
Done that, it makes no difference.
It appears to be a problem loading / accessing the FBX character which then has the camera attached to it.
How are you loading the character? Shouldn't you just be using the project window? Also, don't post comments as other answers, please.
whoops - clicked wrong button before. The script is taking an fbx object from the project area and putting it into the hierarchy, which it then uses as character reference for the game.
code :
example = (GameObject)Resources.LoadAssetAtPath("Assets/$$anonymous$$odels/character.FBX", typeof(GameObject));
I've got a workaround by dragging my character across from the project to the hierarchy windows and adding script components to it in the hierarchy window.
You should really use prefab instantiation for this. It's much safer. Is there any good reason why you aren't already?
Only because I want to make changes to my FBX model without having to make any changes in inspector etc for Unity
Your answer
Follow this Question
Related Questions
Nothing shown on build 1 Answer
Distribute terrain in zones 3 Answers
Build Game for Xbox 360 1 Answer
how to get a window bigger than screen 0 Answers
Built .exe Won't Run 1 Answer