This document is about: FUSION 1
SWITCH TO

This page is a work in progress and could be pending updates.

Meeting

Level 4
Available in the Industries Circle
Circle

Overview

This sample demonstrates an approach on how to develop a simple meeting application with Fusion.

First, the player customizes its avatar on the selection avatar screen. They can then move on to the meeting room, where a number of tools and features have been set up.

Here are some of the most notable features:

  • public/private groups to separate users in different rooms
  • room sound insulation when a door is closed
  • 3D pens with various colors
  • 2D pens with moveable drawing on a vertical or horizontal whiteboard
  • screen sharing
  • social distancing
  • interactive menu to provide tips to users

If the player launches the sample on a PC or MAC, it can choose between the Desktop mode (using keyboard & mouse) or VR mode (Meta Quest headset).

fusion meeting overview

Technical Info

  • This sample uses the Shared Mode topology,
  • Builds are available for PC, Mac, Meta Quest & WebGL,
  • The project has been developed with Unity 2021.3, Fusion 1.1.8, Photon Voice 2.53,
  • 2 avatars solutions are supported (home made simple avatars & Ready Player Me avatars),

Before you start

To run the sample :

  • Create a Fusion AppId in the PhotonEngine Dashboard and paste it into the App Id Fusion field in Real Time Settings (reachable from the Fusion menu).

  • Create a Voice AppId in the PhotonEngine Dashboard and paste it into the App Id Voice field in Real Time Settings

  • Then load the AvatarSelection scene and press Play

Download

Version Release Date Download
1.1.8 Dec 21, 2023 Fusion meeting 1.1.8 Build 386

Download Binaries

A demo version of Meeting is available below :

The Meeting Screen Sharing Recorder for Windows is available below :

WebGL

The Meeting sample can be build for a WebGL target.

You can test Metaverse WebGL build here.

Due to some Unity limitations regarding WebGL builds though, a few point need specific care to work properly and are detailed here.

Note that this WebGL build does not support WebXR (virtual reality in the browser): while it is achievable with some open source libraries, like unity-webxr-export, it is not yet supported by default in Unity, and thus not demonstrated here.

Handling Input

Desktop

Keyboard
  • Move : WASD or ZQSD to walk
  • Rotate : QE or AE to rotate
  • Pen color : C to change the pen Color
  • Menu : Esc to open or close the application menu
Mouse
  • Move : left click with your mouse to display a pointer. You will teleport on any accepted target on release
  • Rotate : keep the right mouse button pressed and move the mouse to rotate the point of view
  • Move & rotate : keep both the left and right button pressed to move forward. You can still move the mouse to rotate
  • Grab : put the mouse over the object and grab it using the left mouse button.

Meta Quest

  • Teleport : press A, B, X, Y, or any stick to display a pointer. You will teleport on any accepted target on release
  • Touch (ie for chat bubbles lock buttons) : simply put your hand over a button to toggle it
  • Grab : first put your hand over the object and grab it using controller grab button

Folder Structure

The main folder /MeetingRoom contains all elements specific to this sample.

The folder /IndustriesComponents contains components shared with others industries samples like Fusion Stage ScreenSharing sample, Fusion Expo sample or Fusion Metaverse sample.

The /Photon folder contains the Fusion and Photon Voice SDK.

The /Photon/FusionXRShared folder contains the rig and grabbing logic coming from the VR shared sample, creating a FusionXRShared light SDK that can be shared with other projects.

The /Photon/FusionAddons folder contains the Industries Addons used in this sample.

The /Plugins folder contains the Ready Player Me SDK

The /XR folder contain configuration files for virtual reality.

Architecture overview

The Meeting sample rely on the same code base than the one described in the VR Shared page, notably for the rig synchronization.

The grabbing system used here is the alternative "local rig grabbing" implementation described in the VR Shared - Local rig grabbing page.

Aside from this base, the sample, like the other Industries samples, contains some extensions to the FusionXRShared or Industries Addons, to handle some reusable features like synchronized rays, locomotion validation, touching, teleportation smoothing or a gazing system.

Used Industries Addons

We provide to our Industries Circle members a list of reusable addons to speed up 3D/XR application prototyping. See Industries Addons for more details. Here are the addons we've used in this sample.

Spaces

We reused the same approach than the one used in the Metaverse samples to allow several instances of the same room. So, users have the possibility to join the public room or a private meeting room by specyfing a room number. This choice can be made in the avatar selection screen or later with the application menu.

See Space Industries addons for more details.

ConnectionManager

We use the ConnectionManager addon to manage the connection launch and spawn the user representation.

See ConnectionManager Addons for more details.

Feedback

We use the Feedback addon to centralize sounds used in the application and to manage haptic & audio feedbacks.

See Feedback Addons for more details.

Dynamic Audio group

We use the dynamic audio group addon to enable users to chat together, while taking into account the distance between users to optimize comfort and bandwidth consumption.

See Dynamic Audio group Industries Addons for more details.

Audio Room

In addition, we wanted to illustrate how to soundproof people who are not in the same room. So, we have created two rooms in the scene seperated by a sliding door.

fusion meeting sliding door audio room

We use the AudioRoom addon to manage the dynamic audio group update according to the door status. The door opening and closing are triggered by buttons which call the AudioDoor.ToogleDoor() method. To door animation is managed by the TriggerDoorAnimation class which listen to the OnStatusChange() event received from the AudioDoor class.

See Audio Room Industries addons for more details.

Locomotion validation

We use the locomotion validation addon to limit the player's movements (stay in the room, avoid furniture, etc.).

See Locomotion validation Industries Addons for more details.

Social distancing

To ensure comfort and proxemic distance, we use the social distancing addon.

See Social distancing Industries Addons for more details.

Screen Sharing

Users can share their computer screen and broadcast it on the meeting room's large screen. Unlike the "Stage ScreenSharing" sample, here there is no authorization management: the last user to start a broadcast takes control of the screen. This is managed by the EmissionOrchestrator which implements the IEmitterListener interface. So when a client starts a screen share, the PlayerId is saved :

  • either directly by the client itself if it has the State Authority over the screen,
  • or using a RPC if the client doesn't have the State Authority.

C#

public void SetEmitter(PlayerRef emitter, string name)
{
    if (Object.HasStateAuthority)
    {
        EmittingPlayer = emitter;
        EmittingPlayerName = name;
    }
    else
    {
        RPC_SetEmitter(emitter, name);
    }
}
    
[Rpc(sources: RpcSources.All, targets: RpcTargets.StateAuthority)]
public void RPC_SetEmitter(PlayerRef emitter, string name)
{
    EmittingPlayer = emitter;
    EmittingPlayerName = name;
}

As soon as a screen share is started by another player, the screen share is stopped with StopEmitting() to save resources and bandwidth.

See Screen Sharing Industries Addons for more details.

fusion meeting screensharing screen
fusion meeting screensharing screen
fusion meeting screensharing screen

Drawing

The room contains whiteboards with 2D pens and several 3D pens. When the drawing is complete (i.e. when the user releases the "trigger" button), a handle is displayed. This allows the user to move 2D or 3D drawings.

See 3D & 2D drawing Industries Addons for more details.

fusion meeting 3d drawing
fusion meeting 2d drawing
fusion meeting 2d drawing
fusion meeting 2d drawing

Blocking contact

We use this addon to block 2D pens and drawing' pin on whiteboard surfaces.

See Blocking contact Industries Addons for more details.

Interactive Menu

This addon is used to display tips on how to use pens or a delete button on drawings.

See Interactive Menu Industries Addons for more details.

fusion meeting interactive menu for meeting sample
fusion meeting interactive menu for meeting sample

Extended Rig Selection

We use this addon to switch between the various rigs required in this sample. Indeed, we need three configurations in this sample :

  • VR rig for Meta build,
  • Desktop rig for Windows and Mac client,
  • no rig to build the Windows recorder application in charge to stream desktop on the screen (indeed, we do not need to spawn a network rig in this mode).

So, the Extended Rig Selection setup is the following :

fusion meeting extended rig selection

See Extended Rig Selection Industries Addons for more details.

Desktop Focus Mode

As it is difficult to use a 2D pen to draw on a whiteboard while being in 3D, the ScreenDrawing class relies on the "Desktop Focus Mode" addon to activate the focus mode and display a specific user interface.

fusion meeting desktop focus mode

See Desktop Focus Industries Addons for more details.

Compilation

We use the same Unity scenes for the normal client and for the recorder client (to stream a desktop on the screen). So, we have to make some manual modifications depending on the client we want to compile.

Recorder Client Compilation

So, to compile the recorder application, you have to follow 2 steps :

1/ Open the AvatarSelection scene : on the LoadMainSceneInRecorderMode game object, check the box Is Recorder Compilation Mode to load the main scene directly without loading the avatar selection scene. This tips is required because the scene list must be identical for the normal client and for the recorder.

2/ Open the MeetingRoom scene : on the ExtendedRigSelection game object, ExtendedRigSelection class, set the Selection Mode parameter to Selected by User Pref.

3/ Change some Unity parameters :

fusion meeting room screen sharing recorder unity parameters
  • Project Settings / Player :

    • Change Product name : add 'Recorder' for example
  • Project Settings / Player / Resolution and Presentation / Resolution

    • Fullscreen Mode : Windowed
    • Default Screen Width : 640
    • Default Screen Height : 380
    • Resizable : No
    • Allow Fullscreen : No

Normal Client Compilation

So, to compile the normal client application, you have to follow 3 steps :

1/ Open the AvatarSelection scene : on the LoadMainSceneInRecorderMode game object, uncheck the box Is Recorder Compilation Mode.

2/ Open the MeetingRoom scene : on the ExtendedRigSelection game object, ExtendedRigSelection class, set the Selection Mode parameter to Selected by User Pref.

3/ Change some Unity parameters :

fusion meeting room screen sharing normal unity parameters
  • Project Settings / Player :

    • Change Product name : add 'Client' for example
  • Project Settings / Player / Resolution and Presentation / Resolution

    • Fullscreen Mode : Fullscreen Windows
    • Resizable : Yes
    • Allow Fullscreen : Yes

Third party components

Back to top