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.
Camera control
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.
https://assetstore.unity.com/packages/tools/camera/dynamic-split-screen-154572
Any news on the progress for a LWRP solution? I bought the asset, then decided to work with ShaderGraph.
This is awesome btw. Thank you for making it.
Hey, thanks for the kind words. Sorry for taking so long to reply. I’m looking into my current solution, unfortunately it won’t be as clean as I’d like it to be since I have to support LWRP, HDRP and URP (LWRP since Unity version 2019.3) and I still have a little bit of work left to do but I should get it out by the end of next week.
LWRP support is available in version 1.1 of Dynamic Split Screen package.
Setup guide can be found here if needed https://marekkost.com/2019/11/04/dynamic-split-screen-guide-2-custom-3d-setup/
Hi there!
Anysupport for HDRP? I noticed the code in the package but it’s throwing me an error with .7.4.1 (HDRP),
#elif HDRP
public class SplitScreenRendererPass : CustomPass
#endif
this doesn’t seem to be right?
not sure if it was just a W.I.P or not 🙂
Hi,
unfortunately I didn’t implement rendering for HDRP version for dynamic split screen.
I had planned to do it but for some reason I dropped it, I figured most of the people would use standard / URP.
But I might look into the HDRP implementation if I have time during the weeked and I’ll let you know if I make any progress.
that would be greatly appreciated 🙂