Kanda Players 0.7.0
|
In-session Menu is the menu that can be toggled on/off by the player during the runtime in a session. The In-session Menu usually consists of couple of functionalities that the player can trigger, as well as the player current status. Some settings are also be included in the menu.
In-session Menu only lives in a specific scenario within a session. When the player moves to another scene, the In-session Menu will also be removed (toggled off). The player cannot see the UI canvas of other player's menu, this is because the UI canvas is not synched between players.
ESC
) to toggle it On/OffPressing button will only toggle on/off the menu that the player spawned themselves.
But for VR, the hand can toggle off the menu that is spawned by the other hand by the same player.
InSessionMenu
: A tag for the In-session Menu entity itself.InSessionMenuSpawner
: Holds the menu prefab and position and rotation offsets.ToggleInSessionMenuCommand
: An RPC command to be sent to server to spawn/destroy In-session menu.InSessionMenuToggleClientSystem
.PlayerInfo
already exists in the world. If it is, the ToggleInSessionMenuCommand
should have ShouldDestroy
set to true
.ToggleInSessionMenuCommand
.ToggleInSessionMenuCommand
in InSessionMenuToggleServerSystem
.ToggleInSessionMenuCommand.ShouldDestroy
, spawn or destroy the menu entity.PlayerInfo
to avoid double spawning the same menu.InSessionMenu.MenuCanvasPrefab
for the local player only and skipping the other player's canvas.