Back To Index

TrackPlayerCount

Jump To Parameters
Jump To Function Definitions


Parameter Definitions

Select the parameter name from below to jump directly to it on this page.

OnCountChanged
ReachedFallPlayerCount
ReachedPlayerCount
executeEventAtPlayerCount
fallBelowCount
isOwner
reachPlayerCount
teamName
texts
useRoomOwnerShip


OnCountChanged

UnityEvent. Called when the player count changes

Exposed Value Type Default Value
public IntUnityEvent new IntUnityEvent()

Back To Top


ReachedFallPlayerCount

UnityEvent. Called when you hit the fallBelowCount when you were originally at a higher value.

Exposed Value Type Default Value
public UnityEvent new UnityEvent()

Back To Top


ReachedPlayerCount

UnityEvent. Called when you reach the specified reachPlayerCount.

Exposed Value Type Default Value
public UnityEvent new UnityEvent()

Back To Top


executeEventAtPlayerCount

Trigger the ReachPlayerCount unityevent when the player count = reachPlayerCount.

Exposed Value Type Default Value
protected bool false

Back To Top


fallBelowCount

The number of players to fall to to excute the ReachedFallPlayerCount UnityEvent.

Exposed Value Type Default Value
protected int 2

Back To Top


isOwner

Excute if are you/are not the owner.

Exposed Value Type Default Value
protected bool false

Back To Top


reachPlayerCount

The number of players to reach before executing this ReachPlayerCount UnityEvent.

Exposed Value Type Default Value
protected int 4

Back To Top


teamName

If you ony want to count the number of players that are on a certain team.

Exposed Value Type Default Value
protected string ””

Back To Top


texts

The series of text objects to modify with the number of players in the room.

Exposed Value Type Default Value
protected Text[] new Text[] { }

Back To Top


useRoomOwnerShip

Only execute these unity events based on whether or not you’re the room owner.

Exposed Value Type Default Value
protected bool false

Back To Top

Function Definitions

Select the function name from below to jump directly to it on this page.

DisplayCount
EnableReachPlayerCountEvent
SetText
Update


protected virtual void DisplayCount(int count)

Calls the SetText function to set the values of the texts to be what the current input count is. If the input count was different from the last time you called this function it will execute the OnCountChanged UnityEvent.

Expose Value Overrideable Returns
protected True Does not return anything
Parameter Name Description
count int type, the count to display on all the texts.

Back To Top


public virtual void EnableReachPlayerCountEvent(bool isEnabled)

Used to make sure that the fall and reached unity events are fired only once. This is calls as part of the Update function.

Expose Value Overrideable Returns
public True Does not return anything
Parameter Name Description
isEnabled *No found decription

Back To Top


protected virtual void SetText(string inputText)

Sets the value of the texts to be whatever the input value is.

Expose Value Overrideable Returns
protected True Does not return anything
Parameter Name Description
inputText string type, the string to display on all the texts

Back To Top


protected virtual void Update()

Dynamically sets the texts values to be what the currented connected player count is. Will only update these values if you’re currently connected to a photon room. Will call the ReachedFallPlayerCount and ReachedPlayerCount UnityEvents.

Expose Value Overrideable Returns
protected True Does not return anything

No parameters

Back To Top