您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
nathaniel.buck@unity3d.com 42fe907a Almost actual progress: This now has the two clients connecting to Relay on join, with the host keeping the allocation alive, and they will send each other changes to their name, emote, and ready immediately. 3 年前
Assets Almost actual progress: This now has the two clients connecting to Relay on join, with the host keeping the allocation alive, and they will send each other changes to their name, emote, and ready immediately. 3 年前
Packages Partial progress: Following a trio of Relay+UTP samples, I seem to have something that will bind a transport to Relay and keep the connection open (as evident from the fact that a client can join after what would be the 10s timeout on Relay and successfully get the JoinAllocation, when they wouldn't without keeping the connection open even when binding was correct). However, this current code is very slapdash and sloppy; I'm just committing now as a very rough draft. 3 年前
ProjectSettings Partial progress: Following a trio of Relay+UTP samples, I seem to have something that will bind a transport to Relay and keep the connection open (as evident from the fact that a client can join after what would be the 10s timeout on Relay and successfully get the JoinAllocation, when they wouldn't without keeping the connection open even when binding was correct). However, this current code is very slapdash and sloppy; I'm just committing now as a very rough draft. 3 年前
~Documentation/Images Merge pull request #7 from Unity-Technologies/dev 3 年前
.gitignore Updated latest Lobby Rename and Moved Relay allocation to Countdown. 3 年前
README.md Minor readme formatting 3 年前

README.md

Closed Beta - 7/14/21

Lobby and Relay are only available in closed beta at the moment, to use these services you will need to have signed up here for the services to show in your Organization: https://create.unity3d.com/relay-lobby-beta-signup

Game Lobby Sample

Unity 2021.2 0b1

This is a Unity Project Sample showing how to integrate Lobby and Relay into a typical Game Lobby experience.

Features Covered:
- Lobby Creation
- Lobby Query
- Lobby Data Sync
  - Emotes
  - Player Names
  - Player Ready Check State  
- Lobby Join
- Relay Server Creation
- Relay Code Generation
- Relay Server Join

Service Organization Setup

Create an organization

Follow the guide to set up your cloud organization:

Organization Tutorial

Lobby & Relay

We use the lobby service to create a space that our users can join and share data through.

Lobby Overview

Lobby Dashboard

We use the Relay service to obfuscate the Hosts' IP, while still allowing them to locally host strangers.

Relay Overview

Relay Dashboard

Setup

For either one, select "About & Support => Get Started"

Closed Beta Only

Follow the steps, downloading your packaged folders to the Sample Project Package\Packages

*If you open the project and you get the "Enter Safe Mode" dialogue, it means you are missing your packages.*

*If you still cannot find the package namespaces, ensure the Assets/Scripts/LobbyRelaySample.asmdef is referencing the packages.*

Follow the steps until you hit "Lobby/Relay On"

Solo Testing

Create a new Unity Build of the project in the OS of your choice. Because the Authentication service creates a unique ID for builds, you will need to host a lobby in Build and join in Editor or vice versa.

  1. Start the game, and hit start to enter the Room List. This Queries the rooms service for available Lobbies, there wont be any right now.

Join Menu

  1. The Create Menu Lets you make a new Lobby.

Create Menu

  1. This is the Lobby, It has a Room code for you to share with your friends to allow them to join. For demonstration purposes we also show the Relay Code, which will be passed to all users in the Lobby.

Lobby View

  1. Open the second game instance in Editor or in Build, you should now see your Lobby in the list.

Populated Join View

  1. The Lobby holds up to 4 players and will pass the Relay code once all the players are ready.

Relay Ready!

  1. The countdown will start after the rooms data synch has completed. (It is a little slow due to our refresh rate being low at the moment)

Countdown!

  1. The relay service IP gets passed to all users in the lobby, and this is where you would connect to a server, if you had one.

InGame!