PlayerListObject
Jump To Parameters
Jump To Function Definitions
Parameter Definitions
Select the parameter name from below to jump directly to it on this page.
hideLocationIfNotSet
location
notReadyImage
ownerText
playerImage
playerNameText
readyImage
readyText
sceneName
showIfOwner
userId
hideLocationIfNotSet
Will hide the Text component that is responsible for displaying “
the player’s location if that location currently is not set.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | false |
location
The Text component that is responsible for displaying the Unity scene the player is currently in.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Text | null |
notReadyImage
The GameObject to SetActive if the player is marked as not ready.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | GameObject | null |
ownerText
The Text component that is responsible for displaying if this player is the MasterClient or not.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Text | null |
playerImage
The Image component that is specific to this player.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Image | null |
playerNameText
The Text component that is responsible for displaying the player’s name.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Text | null |
readyImage
The GameObject to SetActive if the player is marked as ready.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | GameObject | null |
readyText
The Text component that is responsible for displaying if the player is marked as ready or not.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Text | null |
sceneName
Hidden variable. The scene name this player is currently in.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | string | “Unknown” |
showIfOwner
The Image component to display if this player is the MasterClient.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Image | null |
userId
Hidden variable. The user id of this player.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | string | null |
Function Definitions
Select the function name from below to jump directly to it on this page.
GetReadyState
OnDestroy
RecievedPhotonEvent
SetContents
SetPlayerContents
SetPlayerImage
SetReadyState
Start
public virtual bool GetReadyState()
Returns if this player is ready or not.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | True or False, player is ready |
No parameters
protected virtual void OnDestroy()
Removes the
RecievedPhotonEventfunction from Photon’sEventReceiveddelegate.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
protected virtual void RecievedPhotonEvent(EventData obj)
Callback method. Called whenever a PhotonEvent is Received. If the event code matches
CB_EVENT_READYUPit sets the ready stat of this player if the userId that is received matches this one.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| obj | EventData type, the object holding the received event data |
public virtual void SetContents(PlayerListInfo info)
Sets all the Text and Image values based on the input
info
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| info | PlayerListInfo type, all the data about this player |
public virtual void SetPlayerContents(Photon.Realtime.Player player, string isOwnerText = “ROOM OWNER”, string nonOwnerText = “”)
Sets the Text and Images based on the input values.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| player | Photon.Realtime.Player type, the |
| isOwnerText | string type, the string value to display if this is a MasterClient |
| nonOwnerText | string type, the string value to display if this is NOT a MasterClient |
public virtual void SetPlayerImage(Sprite image)
The Image to set as the player image based on the input
image.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| image | Sprite type, the image to set for the player. |
public virtual void SetReadyState(bool inputIsReady)
Make this player be marked as ready.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| inputIsReady | bool type, this player is ready? |
protected virtual void Start()
Sets this component values with the
InstantiationDatafor this component. Also adds theRecievedPhotonEventfunction to the Photon’sEventReceiveddelegate so it will be called anytime a PhotonEvent is received.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters