newbie question... All I get is a blue screen when running the game.

Hi all, new to Unity… I am working through a video series on Unity. In this particular exercise we have the following.

4 cubes
Directional Light
Main Camera
Plane

The idea here is to work on collider scripting. Both the scene view and game preview screens are showing. When running the game, the idea here is to move a cube in the scene view and watch the cube change colors in the game view. At this point, I can see the plane and the cubes in both scene and game preview screens.

However, when I run the game, I’m not seeing my plane, or the cubes in the game view. All I see is the default blue background.

I have my camera pointing at the plane and the cubes, but they just don’t show up for some reason in the game view when I run the game.

Hoping someone can help me figure out why the plane and cubes are now showing up on the game view when running the game.

Thanks!
Rick

What you see in the game scene view is what you will see when you run the game, unless of course you are either turning off renderers somewhere or maybe the objects have rigidbody and gravity enabled and are falling out of view.

After run, I would look at the editor view. Does it look the same?

Thanks renman3000…

I figured it out… Not sure why this is happening but, I set the camera up to point at the scene, but when running the game, the camera for some reason is no longer pointing at the scene. I was able to rotate/reposition the camera while the game is running and was able to see things.

Would be good to know why the camera seems to be repositioning itself at runtime though.

UPDATE

Ok, I figured it out…

There is a script called CameraScript.cs. which is attached to the main camera that has the following function
void Awake()
{
transform.position = startingPosition;
Debug.Log ("New Starting Position: " + startingPosition);
}

The transform.position was being updated at runtime. :slight_smile:

1 Like

Yeh.
:)(