This demo showcases the Peer 2 Peer interface working with Unity's netcode. This is done through a simple game where players can move a square around the screen.
- The
Start Hostingbutton starts hosting a game on the local machine. - The
Take Controlbutton directs input towards the square allowing the user to move it around. - The
Release Controlbutton releases control of the square allowing input to be directed elsewhere. - The
Joinbutton in the friends tab allows the user to join a friend who is hosting a game.
The P2P Netcode Sample Scene is included in the Extra Pack 1 sample pack.
Upon import, the com.unity.netcode.gameobjects package that this scene requires will be automatically installed. You will still need to add it in the build settings.
Default version 1.0.2. Verified Working Versions 1.5.1 , 1.5.2
Note
See Epic's documentation on the P2P interface for more information.
Note
This sample includes the UIFriendsMenu. Please see the plugin's documentation on UIFriendsMenu for more information.
