(solved) Scene is missing fullscreen camera (Block Breaker, setting up play space)

so o followed the video when placing my background into the play space. when I went to play the level1 scene it was just black, it didn’t show the background or the end game button. so I deleted the background and retried the whole process. this time when I played the scene the background showed up and the button appeared but didn’t work. so I tried playing it from the start scene and when it gets to the level1 scene it just says scene is missing fullscreen camera. I don’t know whats going on. please help. if you have a place I can put the zip file, let me know.

this is a zip of the project on dropbox if you wanna take a look at it.

Can you post a screenshot of your unity with the level 1 scene, hierarchy etc. showing?
If you have a main camera listed in the hierarchy, make sure it’s selected so we can see its settings in the inspector :slight_smile:

I just posted the project on dropbox if you could take a look at it. thank you

Right, well your camera issue is a fairly easy fix. You may have noticed (and this would go in a proper bug report) the following behaviour when trying to work out what was wrong:

  • There is definitely a Main Camera in the Level_01 scene Hierarchy, and the Inspector shows that it is active
  • Playing the game starting from Level_01 the camera works as expected
  • Playing the game starting from Start the camera does not work in Level_01 and disappears from the scene Hierarchy during play

So your issue is that something is deleting your camera at runtime for some reason - specifically when moving from Start to Level_01. As to what… Well the only thing we’ve done in this project that deletes anything is the MusicPlayer script, and it turns out you have one attached to your Main Camera.

Essentially, when you switch from Start, with your music playing away, the script on Level_01’s Main Camera activates, detects that it’s duplicating the Music Player effect (which has been carried over by DontDestoyOnLoad) and Destroys the gameObject it’s attached to - your camera.

The solution is simple: just remove the extra MusicPlayer script from the camera - you’re not going to need it there for any final build, since the player should always be coming from the Start menu and so bringing the MusicPlayer from there. If you really want a MusicPlayer in Level_01 (e.g. to ease the tedium of testing), then create an Empty GameObject in the hierarchy and just attach the script to that - then both can be safely deleted when they’re no longer needed.

Exactly the same issue is behind your Game Over button problem - you have two extra copies of the MusicPlayer script on your level manager, so even if you start on Level_01, at least one of them has to be a duplicate - destroying the object and meaning your button can’t access the level manager script. Same solution - delete the rogue MusicPlayer scripts and everything works as it should. :slight_smile:

Hope this helps, and good luck with the rest of the course!

hey man, perfect advice. now the project works like a charm. I appreciate the help.

That makes sense…given that the music player destroys the gameobject, which, if it is attached to the camera, is the camera gameobject. Not a bug, just a feature to be aware of :slight_smile: If you destroy a gameobject, you destroy all components attached to it and children parented to it, and all their components, and so on.

(speaking of bugs and features, where I used to work, one of the managers had a Volkswagen bug with vanity plate saying “FEATURE”).

Privacy & Terms