PlayerList
Jump To Parameters
Jump To Function Definitions
Parameter Definitions
Select the parameter name from below to jump directly to it on this page.
anim
autoCloseWithChatBox
closeAnimation
closeSound
content
debugging
delayDisable
openAnimation
openSound
openWindow
playerJoinObject
rootObj
soundSource
anim
If supplied will trigger the open/close animations on this component.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Animation | null |
autoCloseWithChatBox
Automatically close the playerlist window when the chatbox is open.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | true |
closeAnimation
The close animation name to play on the anim component.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | string | “CloseList” |
closeSound
The sound that will play when closing the player list window.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | AudioClip | null |
content
The gameobject that will hold the content of your scroll view.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | GameObject | null |
debugging
If you want to see everything this is doing in runtime. Turn on debugging to log to the console.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | false |
delayDisable
How long to wait after a button press to disable/enable the chat window. “
This is helpful if you are playing an animation.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | float | 2.0f |
openAnimation
The open animation name to play on the anim component.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | string | “OpenList” |
openSound
The sound that will play when opening the player list window.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | AudioClip | null |
openWindow
OnHold = Display the player window when you’re holding the selected key.\n\n”
OnPress = Display the player window and close the player window with the key press.\n\n”
Invoke = Have another script open the window. No key press will open this window.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | PressType | PressType.OnPress |
playerJoinObject
The object that will hold the visual item that will be “
instantiated as a child of the content gameobject. This object “
must have the "PlayerListObject" component attached to it’s root.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | GameObject | null |
rootObj
When enabling/disable this playerList it will enable/disable this object.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | GameObject | null |
soundSource
The AudioSource that the open/close sounds will play from.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | AudioSource | null |
Function Definitions
Select the function name from below to jump directly to it on this page.
AddPlayer
AddPlayer
AddPlayers
Awake
ClearPlayerList
ClearPlayerList
DoEnable
EnablePlayerListWindow
PlaySound
RemovePlayer
RemovePlayer
SetPlayerList
Update
UpdateLocationToCurrentScene
UpdateLocationToGoingToScene
UpdatePlayer
public virtual void AddPlayer(string chatUserId)
Calls the
AddPlayerwith a newPlayerListInfoobject based on the inputchatUserId.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| chatUserId | *No found decription |
public virtual void AddPlayer(PlayerListInfo player)
Creates a child gameobject with all the settings found in the input
PlayerListInfoobject. Also makes sure the scale and positioning is correct.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| player | PlayerListInfo type, the information for this player to display |
public virtual void AddPlayers(List players)
Calls
AddPlayerfunction for each player.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| players | *No found decription |
protected virtual void Awake()
Makes sure the
rootObjis inactive
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
public virtual void ClearPlayerList(string temp)
Calls
ClearPlayerListfunction.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| temp | *No found decription |
public virtual void ClearPlayerList()
Destroys every child gameobject.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
protected virtual IEnumerator DoEnable(bool isEnabled)
Enables the
rootObject, plays the animation, and plays the open or close sound via thePlaySoundfunction.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| isEnabled | bool type, show or hide the player list window |
public virtual void EnablePlayerListWindow(bool isEnabled)
Calls the
DoEnableIEnumerator.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| isEnabled | *No found decription |
protected virtual void PlaySound(AudioClip soundClip = null, float volumeLevel = 0.5f)
Play the input
soundClipat the specifiedvolumeLevelon thesoundSourceAudioSource.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| soundClip | AudioClip type, the AudioClip to play. |
| volumeLevel | float type, the volume to set the soundSource to. |
public virtual void RemovePlayer(string chatUserId)
Calls the
RemovePlayerfunction with a newPlayerListInfobased on the inputchatUserId
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| chatUserId | strign type, the chat user id |
public virtual void RemovePlayer(PlayerListInfo player)
Find the child object that matches the User Id of the input player and destroys it.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| player | PlayerListInfo type, extracts user id from this |
public virtual void SetPlayerList()
Returns a list of all subscribers in the chatbox’s data channel. Calls
GetDataSubScribersfunction and loops through those calling theAddPlayerfunction.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | List |
No parameters
protected virtual void Update()
Will watch for when the users presses the
keyToPressdoing it like the specifiedopenWindowtype. If those criteria match it will open or close this window.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
public virtual void UpdateLocationToCurrentScene()
Broadcasts data via the data channel on the chatbox to set the UserId to be in a new Unity scene.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
public virtual void UpdateLocationToGoingToScene()
Broadcasts data via the data channel on the chatbox to set this UserId to be in a transition state.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
public virtual void UpdatePlayer(PlayerListInfo info)
Find the child object that matches the input
infoand calls theSetContentsfunction with the inputinfoon it.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| info | PlayerListInfo type, the information for a given player |