Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Split screen game with up to 4 UI canvases

Discussion in 'UGUI & TextMesh Pro' started by hellobard, Oct 14, 2019.

  1. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    138
    Hi,

    So I have a game with a split screen mode that has four cases:
    1 Player Mode - 1 canvas (not scaled)
    2 Player Mode - 2 canvases (not scaled)
    3 Player Mode - 1 canvas top 50% of the screen (not scaled), 2 canvases scaled to 0.5
    4 Player Mode - 4 canvases scaled to 0.5

    All canvases consist of a prefab that is used for all 4 players.
    I have this working well in 16:9, but if a player has a 16:10 screen, this setup becomes a problem as the canvases are hard wired for 16:9. The moment I start scaling the rect transforms, the anchors stop hitting their marks and I am having trouble figuring out how to make this work.

    Has anyone made a split-screen UI setup and could tell me what the ideal setup for something like this is?
     
unityunity