Skip to main content

PlayerRoleProvider

A class in Root.Township, the global namespace.

Server: gives a player a fixed account role through the Alta web API when called, for example from a UnityEvent.

Constructors​

MemberWhat it is
PlayerRoleProvider()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private AssignableRoles roleToProvideThe role to give.

Methods​

MemberWhat it is
void GiveRoleToPlayer(Player player)Asks the API to give roleToProvide to the player's account. Does not wait for the result.