Dynamic Split Screen for Unity
What is this? Finally an actual new project?
Yes– me, 2019
As a part of my new project I have decided to implement my own dynamic split screen solution (because why not). Besides basic ability to show 2 player views on one screen I was focused on implementing system that is smooth, easy to use and contains all the functionality regarding camera control that I would need.
Features that made it to the package:
- split screen angle determined by relative position of players
- resizing of split screen
- modifiable camera size (distance)
- ability to change and lock camera angle
- smooth transitions for all of the features described above
- support for custom split lines
- support for 2D and 3D top-down view
Another big point that I was trying to accomplish was ease of use. With my Dynamic Split Screen, all it takes to implement it is 1 line of code to register each player for split screen.
Triggers for camera control are implemented as ScriptableObjects. With some pre-made objects you can control camera in the scene and if that’s not enough for you, just derive from CameraControlBase class. Actual creation of triggers is as simple as adding CameraControlTrigger component onto any object with trigger Collider and dragging your Controls into the component.
Why not LWRP?
In its current state, my dynamic split screen only works out of the box with Standard Rendering pipeline. When I started developing this package, LWRP and HDRP were preview packages and I didn’t want to invest time into something that could change from one day to another.
Currently plan IS to make it work for LWRP and even though that’s not the issue from implementation standpoint, rendering code will be very different from what it currently is and I couldn’t find a way to merge both solutions into one nice package. Same goes with HDRP.
From my point of view I’ve got 2 options:
1. Figure out a nice way to merge LWRP and HDRP (unlikely)
2. Provide code for implementing LWRP and HDRP outside of the package
Second option is most likely what I’ll do so expect guides on modifying the current implementation for the new rendering pipelines, first of which is going to be LWRP.
How to support?
You can purchase and rate the package on asset store or share this post / video.