Split Screen

When in a first person perspective the third person materials are swapped for an invisible shadow castor material. This then allows the separate first person arms object to render without seeing duplicate arms (or the character’s head from getting in the way of the camera). This works well for single player games, but with split screen games or mirrors the material needs to be swapped multiple times so other players don’t see a character without any arms or head.

The Split Screen Camera component will do this material swap allowing for multiple cameras on the same screen.

Setup

  1. Add a camera using the Scene Setup Manager.
  2. Duplicate that camera. Ensure only one Audio Listener exists within the scene.
  3. Create a new character using the Character Manager.
  4. Create a second character using the Character Manager.
  5. Add the Material Swapper component to the GameObjects that contain the CameraController.
    • If you are using a first person only variant (such as UFPS), then after you have created the character you should replace the Invisible Shadow Caster material on the third person objects with the correct material. For example, with the included Nolan character the materials on the Helmet Renderer should be updated to the helmet material:
  6. If you are not using a Scriptable Render Pipeline add the Material Swapper component to the First Person Camera that is a child of the main camera. Your setup should look similar to:
    The Material Swapper component exists on the four Camera GameObjects.
  7. Adjust the Camera’s Viewport Rect so the cameras do not render over each other. In the above scene the left viewport was adjusted so it has a width of 0.5. The right camera has a X value of 0.5 and a width of 0.5.
  8. On the Camera Controller component set the Character field to the first character, and the second camera’s Character field should be set to the second character.
  9. Ensure the UI is added from the Setup Manager. Duplicate this UI for the second character. The UI then needs to know which character it represents. On each UI Monitor assign the character:
  10. Assign the player-specific inputs to the character. The Unity Input System integration or Rewired integration makes it easy to have multiple inputs attached to a single instance.