To use this extension, you will need an unity project with the corgi engine installed. If you don't have the corgi engine, you can get it from unity asset store.
You can import this project and test the script by yourself. Just be sure to add the corgi engine in the project.
Feel free to use the prefabs of the demo. But If you don't want to, here how to set your unity scene project to work with the extension
- Copy SplitScreen.cs and SplitScreenManager.cs into your Assets/Scripts folder.
- Add two new cameras with the current main camera.
- Edit the Viewport Rect of the camera component to make the camera half the size of the screen. e.g. w:0.5 h:1
- Edit the X value to 0.5 from the right camera
- Add SplitScreen.cs to the left/right camera
- Edit the Z's Camera Offset settings to -10.
- Create an empty object at the root of the hierarchy and name it SplitScreenManager (or whatever you want)
- Add SplitScreenManager.cs to the SplitScreenManager object
- Params SplitScreenManager variables by following the editor instructions
- VoilĂ
Corgi Engine is a product of reunono (more mountains)