Wiring

// Config: Engine - [], Toolkit - [v1.0.0]

This lists what is in the scene and what references what. The shipped scene was generated from this layout.

Hierarchy #

Main Camera              Camera, AudioListener, DemoFollowCamera
Directional Light
EventSystem              Input System UI module when the Input System is installed, else the standalone module
Discord Social           DemoSetupCheck, PlaceholderNetwork, DiscordLobbySession, DemoFlow
                         (Discord Social itself is a subsystem, not in the scene)
Canvas                   Screen Space Overlay, scaled with screen size from 1280 x 720
  Menu                     three columns: Account, Friends, Lobby
  Session HUD / Session    arena, Stage (DemoSessionStage), session bar with Leave session
  Voice Settings           DiscordVoiceSettingsPanel, off until Settings is pressed
  Invite Prompt            DiscordInvitePrompt, child Panel
  Tooltip                  DiscordTooltip, child Panel and Label

References #

ComponentFieldPoints at
DemoFlowsessionthe DiscordLobbySession
menu, sessionViewthe Menu object and the Session object
startButtonMenu/Lobby/Start Session
errorLabelMenu/Lobby/Error
DemoSessionStagesession, followCamera, pawnPrefabthe session, the camera’s DemoFollowCamera, Prefabs/Demo Pawn
DiscordConnectionStatus (on Connection)label, signIn, signOutthe status text and the two buttons
DiscordUserList (on Friends List content)content, recordTemplate, groupByPresence, headerTemplate, searchFieldthe list content, Friend Row, on, Group Header, Friends/Friend Search
DiscordFriendRequestList (received)incoming, content, recordTemplatetrue, its content, Request Row
DiscordFriendRequestList (sent)same, with incoming false
DiscordLobbyMemberListsession, content, recordTemplatethe session, its content, Member Row
DiscordVoiceBar (lobby and session bar)session, joinLeave, mute, deafen and their labelsthe session and the three buttons
DiscordVoiceParticipantList (on Voice List content)content, recordTemplatethe list content, Voice Row
DiscordVoiceSettingsPanel (on Voice Settings)inputDevice, outputDevice, inputVolume, outputVolume, inputMode, the four togglesthe controls in the panel
DiscordLobbyCodesession, field, copythe session, the code field, the Copy button
DiscordJoinLobbysession, code, jointhe session, the code field, the Join button
DiscordAddFriendusername, send, statusthe field, the Send button, the status text
DiscordInvitePromptsession, panel, message, accept, declinethe session and the prompt’s parts
DiscordTooltippanel, labelthe tooltip panel and its text

Buttons wired in the scene #

The Create lobby, Leave lobby, Start session and Leave session buttons call DiscordLobbySession.Create, DiscordLobbySession.Leave, DemoFlow.StartSession and DemoFlow.LeaveSession through persistent onClick listeners. Every other button is wired by its component in Awake.

Row prefabs #

Each row has a DiscordUserProfile whose avatar, displayName.label and statusLabel.label are set.

PrefabExtra components
Friend Rowan Invite button with DiscordInviteButton
Request RowAccept, Decline and Cancel buttons with DiscordFriendRequestRow
Member Rowa child object named Host, off by default
Group Headera text label, used for the Online and Offline headers
Voice Rowspeaking light, avatar and name, a MUTED marker, a Mute toggle and a volume slider with DiscordVoiceParticipantRow
Demo Pawncapsule, CharacterController, DemoPawn, a 3D AudioSource and a DiscordVoiceSource, a child text for the name

Settings outside the scene #

The Application Id is set in Project Settings, Subsystems, Discord Social (the asset Assets/Settings/DiscordSocialSettings.asset). The scene does not store it.

Rate This Article!