Demo: Unitary Session
Starting from version 3.3, our server-side supports Unitary Session, enabling us to perform many operations without the need to restart the session.
Previous Logic:
- Obtain a token using the API key/secret.
- Generate parameters for
LoadScene
(UserRequest, ClientRequest, Capabilities, etc.). LoadScene
by inputting the newly generated token and requests, along with the scene's full name, to return aLiveSessionID
andagentID
for each character in the scene.StartSession
using the obtainedLiveSessionID
.
As seen from the previous logic, modifying any game parameters required disconnecting and restarting the session. Also, character agentIDs
, often cached in memory for easier reconnection, would cause server errors and disconnects if they didn't match the current scene's characters.
Logic After Unitary Session:
- Obtain a token using the API key/secret.
StartSession
directly with the token.- After establishing the session, load parameters such as UserName, ClientInfo, Capabilities, and even Scene Info.
With the new server-side logic, we can dynamically adjust parameters in the session on the client-side, allowing for a more user-friendly connection with the server.
Runtime Player Name Change
We've introduced a new Config menu in the PlayerController
, accessible by default with the ESC
key. Upon opening, it displays current session information, allowing players to change their character names. Changes are immediately reflected in the characters' recognition of the player, eliminating the need to close and restart the session.