SplitScreenSetup scene
The SplitScreenSetup scene is designed to demonstrate ways that you can split screen development in the Unity editor, where the system loads multiple additively and presents them in a single view.
In particular, this scene is useful when you want to do cross-screen service testing and skin-swapping.
TIP: Use layers to make sure that your content is not overlayed on more than one camera in the Split Screen mode. You can cull specific layers on each camera.
Troubleshooting tips
- Make sure that each of your loaded scenes has no more than one camera that is tagged with MainCamera.
- Make sure that other cameras in scenes have the CheckMainCamera script.
- Make sure that the layers are set up correctly for each scene.
- Make sure that the culling option on your cameras is set up correctly.
The SplitScreenSetup GameObject has a script named SplitScreenSetupConfiguration. To set it up, follow these steps:
- Assign your scriptable object that contains your Display Data.
- Pick a mode.
- Manually add to the Scenes list and complete the data.
- For each scene in Scenes list, in the field for Scene Name, enter the path to the correct scene.
- Leave the Scene Object field blank. It is an Editor only tool for users.
- Make sure that Scene Name is filled out. If you leave it empty, the build will not work.
CameraViewportSetup changes the Viewport Rect on Main Camera for the scene this loads in. It determines how the layout of the split screen appears. To visualize the end result, see the SplitScreenVisualizerScript (also assigned to the SplitScreenSetup GameObject)