Skip to content

Commit 282eeb9

Browse files
authored
Photon Realtime Setup Guide for Boss Room (#225)
1 parent e86076c commit 282eeb9

File tree

11 files changed

+113
-3
lines changed

11 files changed

+113
-3
lines changed

Assets/BossRoom/Scripts/Client/UI/PopupPanel.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,20 @@ private void OnOnlineModeDropdownChanged(int value)
147147
{
148148
if (string.IsNullOrEmpty(PhotonAppSettings.Instance.AppSettings.AppIdRealtime))
149149
{
150-
// If there is no photon app id set tell the user they need to install
151-
SetupNotifierDisplay("Photon Realtime not Setup!", "Follow the instructions in the readme to setup Photon Realtime and use relay mode.", false, true);
150+
if (Application.isEditor)
151+
{
152+
// If there is no photon app id set tell the user they need to install
153+
SetupNotifierDisplay(
154+
"Photon Realtime not Setup!", "Follow the instructions in the readme (<ProjectRoot>/Documents/Photon-Realtime/Readme.md) " +
155+
"to setup Photon Realtime and use relay mode.", false, true);
156+
}
157+
else
158+
{
159+
// If there is no photon app id set tell the user they need to install
160+
SetupNotifierDisplay(
161+
"Photon Realtime not Setup!", "It needs to be setup in the Unity Editor for this project " +
162+
"by following the Photon-Realtime guide, then rebuild the project and distribute it.", false, true);
163+
}
152164
return;
153165
}
154166

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Photon Setup Guide for Boss Room
2+
3+
## Setup Photon
4+
5+
1. Access the Wizard from Window → Photon Realtime → Wizard.
6+
2. Click next through the wizard until you get to the Photon Cloud Setup.
7+
3. If you do not already have an account or an App Id, click the Visit Dashboard button to create one. If you created a new account, create a New Application from Photon's Dashboard.
8+
**Note:** The Photon Type for Boss Room is `Photon Realtime`.
9+
10+
![Images/Photon-App.png](Images/Photon-App.png)
11+
12+
4. After the Application is setup, you can get its App ID from Photon's Dashboard. Copy the App ID to your clipboard.
13+
14+
**Note:** This App Id **must** be shared with other people in order to be able to connect to your Photon Room.
15+
16+
![Images/Photon-App.png](Images/Photon-Dashboard.png)
17+
18+
5. In the Photon Wizard Window of your Unity Project, paste the App Id.
19+
6. Click on Setup. You should receive a completion message, for example "Your AppId is now applied to this Project **Done**".
20+
7. Click Next then Done. Setup is complete and you can safely quit the Photon Wizard.
21+
22+
## Playing Boss Room with friends
23+
24+
Once the setup is done, there are two ways you can actually test out is working:
25+
26+
* Launch the Boss Room project using a packaged build.
27+
* Use the Unity Editor, but do that with caution!
28+
29+
With that being said, both ways are almost the same in terms of how you host or join a session.
30+
31+
32+
> **IMPORTANT!** There is a bug in MLAPI at the moment that could prevent users from connecting to each other through the editor.
33+
34+
> **Note:** To reiterate, it is important that all Unity Editor users have the exact same version of the project with no changes locally and their PhotonAppSettings should match with the Host's settings.
35+
36+
37+
### Hosting a Room
38+
39+
---
40+
If you want to host a session then:
41+
42+
43+
1. Click the Start button.
44+
2. Select `Relay Host` from the dropdown on the left.
45+
![Images/Boss-Room-Host-Dropdown.png](Images/Boss-Room-Host-Dropdown.png)
46+
47+
3. A random generated room name will be assigned.
48+
![Images/Boss-Room-Host-Confirm.png](Images/Boss-Room-Host-Confirm.png)
49+
50+
4. Share the generated room name with your users, and click confirm!
51+
52+
5. Done! You are now in the Lobby - also known as the Character Selection Screen. Your friends/users should be able to join now.
53+
54+
> **Note:** You can see the Room Name in the top-left corner.
55+
![Images/Boss-Room-Lobby.png](Images/Boss-Room-Lobby.png)
56+
57+
### Joining a Room
58+
59+
---
60+
61+
If you want to Join a session then:
62+
1. Click the Join Button and select `Relay Host` from the dropdown on the left.
63+
![Images/Boss-Room-Join-Dropdown.png](Images/Boss-Room-Join-Dropdown.png)
64+
2. You should be asked to input the room name below.
65+
![Images/Boss-Room-Join.png](Images/Boss-Room-Join.png)
66+
67+
3. In this example, the room name is: `YQWOWS`
68+
69+
4. Click Join. Once successfully connected, you should be in the Lobby with the rest of your friends.
70+
![Images/Boss-Room-Lobby-Extra.png](Images/Boss-Room-Lobby-Extra.png)
71+

0 commit comments

Comments
 (0)