With one Discord account #
- Set the Application Id in Project Settings, Subsystems, Discord Social. Open
Scenes/Discord Demo (Template).unityand press Play. The status reads Disconnected and Sign in is enabled. If it reads “Not initialised” and a “Setup needed” box is showing, the Application Id is not set. - Press Sign in. The browser opens, you allow the application and Discord confirms. The status becomes Ready, and your avatar, name and status appear in “You”.
- Your friends appear under Online (n) and Offline (n). Type in Search friends to narrow the list by name. Friend requests appear under Requests received and Requests sent.
- Change the status dropdown. Your status changes in Discord and the label under your name follows within a second.
- Press Create lobby. A code appears and you are the only member, marked HOST. Hover Invite before creating a lobby: it is disabled and shows “Create or join a lobby first”.
- Press Join voice. The button becomes Leave voice, and your row appears in the voice list with a speaking light. Mute and Deafen toggle and show MUTED on your row. Settings lists your microphones and speakers.
- Tick 3D voice before joining voice to play other people through Unity audio instead of the device. In the session each capsule then plays its owner’s voice from its position, so voices get quieter as the capsules move apart.
- Press Start session. You load into the arena with one capsule. WASD moves, Space jumps, Leave session returns to the menu with the lobby still open.
- Stop and press Play again. You are signed in without the browser. Sign out clears that.
With the placeholder network there is nothing to connect to, so a single account tests everything except real invites and other players.
With two accounts on two machines #
Each machine needs the same Application Id and its own Discord account, and the two accounts must be friends.
- Invite. On the host, create a lobby and press Invite next to the other account. Discord shows the invite. If the other machine is running the demo and signed in, its prompt shows “<name> invited you to play” with Accept and Decline. Accepting joins the lobby.
- Code. Alternatively, copy the code from the host and paste it into Join on the other machine.
- Members. Both machines show both members in the lobby list, with the host marked.
- Start. The host presses Start session. The other machine should enter the session on its own, because the announcement arrives as a lobby message.
- Capsules. Each machine shows two capsules, one per member, and only your own moves. With
PlaceholderNetworkthe other player’s capsule does not move on your screen, because nothing replicates.
With a real networking library #
Once your DemoNetwork is in place, each client connects to the host’s announced address when the session starts. Check that the address you announce is reachable from the other machine, and that your server refuses a connection from an account that is not in DemoWhitelist.
What has been verified and what has not #
Sign in, your profile, the friends list with statuses, friend requests, changing your status, sending an invite, creating a lobby, signing in again on the next Play without the browser, starting a session (the session view, the capsule with the player’s name, the whitelist accepting the lobby member and refusing a stranger) and leaving the session and the lobby have been run against live Discord on one account. Accepting an invite and joining, a session with several members and voice have not.