Unity ver: 2018.2.2f1
AC ver: 1.65.1
Hey hey,
I've just setup a 2nd scene complete with transistion in my game, and with it I have a couple of questions about cameras:
1) At the moment I have a Main Camera in each scene (as shown below). Is this the correct way to handle things or should I be using a camera prefab that carries across scenes?
2) When the transistion occurs (and only when the transition occurs) the Unity console is logging an error which says "MainCamera has no MainCamera component".
At this point both my scene files have a main camera which looks like this:
What would I need to do to resolve this error?
Thanks!
Comments
Thanks @ChrisIceBox. That modification helped pin the error down to coming off my player prefab.
This raises some further questions however.
My game is 3D first person. The player prefab however has a 'first person camera' child object.
Should this be needed if the scene has a local MainCamera? If I turn it off the game won't run and the console will produce the following error:
The FirstPersonCamera is treated like any other GameCamera - it's merely a reference for the MainCamera to use.
The GameObject must be enabled, and the Camera component will be automatically disabled - the MainCamera will copy it's values every frame.
Tin Pot has a similar setup - try running the 3D Demo with the Movement method set to First Person.
Got it. Thanks, that helps explain a lot.