Class PlayerSessionRequests.SetPlayerSessionPropertiesRequest
Update Player Session information
Namespace: Unity.PSN.PS5.Sessions
Syntax
public class SetPlayerSessionPropertiesRequest : Request
Remarks
Modify one item of information specified, out of all the information concerning the Player Session (it is not possible to update multiple items, and specifying multiple such items will result in an error). If MaxPlayers is being updated, it cannot be modified to a value smaller than the number of players already currently participating. If MaxSpectators is being updated, it cannot be modified to a value smaller than the number of spectators already currently participating. If updating JoinableUserType or InvitableUserType, the user who is the leader of the Player Session must be specified.
Properties
CustomData1
Custom binary session data
Declaration
public byte[] CustomData1 { get; set; }
Property Value
| Type | Description |
|---|---|
| Byte[] |
CustomData2
Custom binary session data
Declaration
public byte[] CustomData2 { get; set; }
Property Value
| Type | Description |
|---|---|
| Byte[] |
ExclusiveLeaderPrivileges
Information about the items to exclude from the leader privileges of a Player Session If a specification is made with this parameter, the leader will not have the specified privileges.If nothing is specified, the leader will have all leader privileges All LeaderPrivilegeFlags are valid here.
Declaration
public LeaderPrivilegeFlags ExclusiveLeaderPrivileges { get; set; }
Property Value
| Type | Description |
|---|---|
| LeaderPrivilegeFlags |
InvitableUserType
Information about who can send invitations to a Player Session
Declaration
public InvitableUserTypes InvitableUserType { get; set; }
Property Value
| Type | Description |
|---|---|
| InvitableUserTypes |
Remarks
NoOne : No user can send an invite Leader : Only the leader can send invites Member : Any member can send invites
JoinableUserType
Users who can join Player Sessions without invitations
Declaration
public JoinableUserTypes JoinableUserType { get; set; }
Property Value
| Type | Description |
|---|---|
| JoinableUserTypes |
Remarks
NoOne : No user can join without an invitation Friends : Friends of the leader of the Player Session can join FriendsOfFriends : Friends of friends of the leader of the Player Session can join Anyone : Anyone can join SpecifiedUsers : Users who have been registered on the joinableSpecifiedUsers list can join without invitations
JoinDisabled
Flag that temporarily prohibits joining a Player Session. When true, joining is prohibited. When false, joining is allowed (however, limited to the users allowed to join without invitations based on the set value of JoinableUserType).
Declaration
public bool JoinDisabled { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
LeaderPrivileges
If a specification is made with this parameter, the leader will have the specified privileges. If nothing is specified, the leader will have Kick and UpdateJoinableUserType privileges. However, it is recommended that ExclusiveLeaderPrivileges, rather than this parameter, be used to specify the leader's privileges. UpdateInvitableUerType flag will be ingorned for these privileges.
Declaration
public LeaderPrivilegeFlags LeaderPrivileges { get; set; }
Property Value
| Type | Description |
|---|---|
| LeaderPrivilegeFlags |
LocalisedNames
Localisaed session names
Declaration
public LocalisedSessionNames LocalisedNames { get; set; }
Property Value
| Type | Description |
|---|---|
| LocalisedSessionNames |
MaxPlayers
Maximum number of supported players. Min 1, Max 100
Declaration
public uint MaxPlayers { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt32 |
MaxSpectators
Maximum number of supported spectators. Min 0, Max 50
Declaration
public uint MaxSpectators { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt32 |
ParamToSet
Which parameters should be set. Only one item can be set at a time, specifying multiple such items will result in an error
Declaration
public PlayerSession.ParamTypes ParamToSet { get; set; }
Property Value
| Type | Description |
|---|---|
| PlayerSession.ParamTypes |
SessionId
Session id to update
Declaration
public string SessionId { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
SwapSupported
Flag indicating whether members who have joined can switch from players to spectators, or from spectators to players, without leaving. When true, swapping is allowed. (Users can swap using the system software UI.)When false, swapping is not allowed
Declaration
public bool SwapSupported { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
UserId
User ID
Declaration
public int UserId { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Methods
Run()
Declaration
protected override void Run()