Search Unity

Query: How does Unity know which player controller to set as default?

Discussion in 'Scripting' started by Deleted User, May 14, 2018.

  1. Deleted User

    Deleted User

    Guest

    Hey guys like the title says I'm just wondering whats the process behind the scene where Unity figures out which the player controller is. Like, if I already have a main Camera in my scene by default when I press play that is the one used, but when I add the standard FPS controller into the scene the view changes to that one. Where do I tweak this setting?

    In Unreal you have an option to change this when open your 'GameMode' class. Does Unity have something like this?
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Your question is more about the camera than a controller? The camera with higher 'depth' will render above other cameras, if that's what you're asking.

    Side note: If you're not really using both cameras, just delete one. :)
     
    Deleted User likes this.
  3. Deleted User

    Deleted User

    Guest

    > The camera with higher 'depth' will render above other cameras, if that's what you're asking.
    Could you explain this a bit more to me?

    And no, I'm not exactly using both the cameras. I just wanted to know how it works.
     
  4. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Well, if you look at the camera in the inspector, there is a 'depth' property.
    If you add 2 cameras to the scene and modify the depth of one you can see.

    https://docs.unity3d.com/ScriptReference/Camera-depth.html

    Is that sufficient? :)
     
    Deleted User likes this.