Local Multiplayer UI with the Multiplayer Event System - Unity Tutorial

preview_player
Показать описание
In this video we will use the Multiplayer Event System from the new Input System in Unity to separate the UI for local multiplayer games.

ᐅGet the full Source Code Bundle to my Unity Tutorials 🤓

📥 Get the Source Code 📥

🔗 Relevant Video Links 🔗
ᐅLocal Multiplayer with NEW Input System - Unity Tutorial
ᐅController and Keyboard Menu Navigation w/ Input System - Unity Tutorial
ᐅHow to Enable UI with the New Input System

🤝 Support Me 🤝

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!

😎 Cool Unity Assets 😎

⏱️ Timestamps ⏱️
0:00 Intro
0:49 Recap
2:12 Multiplayer Event System
7:11 Add UI
7:59 Camera Screen Space for Split screen
8:48 First Selected Property
9:40 Button Navigation Fix
10:45 Further Suggestions
14:11 Outro

💖💖THANK YOU TO ALL MY PATRONS 💖💖

❯❯❯ My Links ❮❮❮
💗 Patreon 💗
💬 Discord Server 💬
🐦 Twitter 🐦
📚 Facebook 📚
🎵 Music 🎵
Ambient Gold
👍 Like and Subscribe! 👍

🖥️ Computer Setup 🖥️
*As an Amazon Associate I earn from qualifying purchases.

#unity3d #unitytutorial #unity2021
Рекомендации по теме
Комментарии
Автор

5:03 dunno if you already know this, but when you add a PlayerInput component, there is a button called "Create Actions...", which basically lets you create a copy of DefaultInputActions.

Nikko
Автор

Thank you! The only "local multiplayer with new input system" tutorial that could help me!

Zambeb
Автор

This is something unity has been needing for a long time!

TwinStick
Автор

Useful stuff right here, thanks Sam 😊👍

victorlapin
Автор

Amazing video. Thank you! The only part I'm figuring out is how to navigate a UI as anyone but Player 1.
I'll post here if I find an easy solution!

mattsponholz
Автор

At 5:08 instead of copying that file and using the new copy I copied the UI action map and pasted it into the Playercontrols input action map.

surfgame
Автор

I am having a problem with this setup. When I spawn in the second player the Canvas group component on the first player's canvas automatically gets disabled and can no longer be interacted with. I can't find any info about how to prevent this.

jamescharnley
Автор

You are so awesome! Keep it up, i love your tutorials

GameDevDave
Автор

Nice video! Your work are awesome, I love yours videos, is very useful

vinipossatto
Автор

how would you make it work in a single Canvas? like a character selection screen? thanks for the help until

Pierre_Dev
Автор

Great course, I am curious if you have a course on local multiplayer where you reuse the same UI canvas without saving the ui as a preset and instantiate it in every player or cloning it for everyplayer. So basically you have one UI canvas object that can be used by any local player to access the menu and change configs to it's player prefs.
I say this because the current solution of cloning the UI for every player i find a bit wasteful

marsblack
Автор

9:25 how would you apply that via script?

XcutAngel
Автор

Great video and followed along until the end. I really want my 2 players to choose their characters on the same screen, independently, but I'm struggling with what needs to be connected to what. So I can spawn a player prefab, and event spawn and associate the eventmanager with it. But how do I connect it to its own specific canvas without getting muddled with player 2?

Delvarn
Автор

7:12 and following section could be replaced if you used the "Button - TextMeshPro" option, TextMeshPro offers a lot higher quality text rendering. Unity's old text UI render is pretty much obsolete (yet they haven't removed it).
I completely overlooked Unity has added Multiplayer Event System script (working on my local coop game). Thanks!!

holmbergen
Автор

it doesn't work, ui is disabled for both players

XboxPlayerPL
Автор

Great tutorial, found it really useful! I'm having a problem where it only uses the right hand side of the screen despite having the Split Screen screen rectangle set to 0, 0, 1, 1. Has anyone else had similar problems (Unity 2020.3.17f1 and Input system 1.2).

ashmcconnell
Автор

Hello, would you be willing to help us add local multiplayer to our offline game ?

FeLiNaLabsLTD
Автор

Hey great Videos. I need your help. How do you make a local multiplayer co-op System without spawning a prefab of a player when the second controller joins the game. For example I'm making a tableSoccer game and I have 4 poles (every pole has a separate script on it) where I can switch between the 4 poles. How can the second controller get access to the other 4 poles of his team without spawning them with a prefab? They are already in the scene. You would help me so much if you have a solution for that!

Swiss_Gamification_Academy
Автор

Came for the Buddons.
Stayed for the Multiplayer Code on how to click Buddons.
Also... Buddon

Vastlee
visit shbcf.ru