Saltar al contenido principal

API

The Bouncer System provides a public API that allows you to interact with player verification and security status from your own Udon scripts.

Public API Methods

_VerifyPlayer

Verifies a player, marking them as authorized. This method is typically used by security personnel through the security scanner.

Signature:

public void _VerifyPlayer(VRCPlayerApi p)

Parameters:

  • p - The player to verify

Behavior:

  • Only security personnel can verify other players
  • Security personnel cannot change the verification status of other security members.

Example:

// Get the player you want to verify
VRCPlayerApi targetPlayer = Networking.GetOwner(someObject);

// Verify the player (must be called by security)
bouncerSystem._VerifyPlayer(targetPlayer);

_IsSecurity

Checks if a player has security status.

Signature:

public bool _IsSecurity(VRCPlayerApi p)

Parameters:

  • p - The player to check

Returns:

  • true if the player is security
  • false if the player is not security or player data is not found

Example:

VRCPlayerApi player = Networking.LocalPlayer;

if (bouncerSystem._IsSecurity(player))
{
Debug.Log("Player is security!");
// Enable security-only features
}

_IsVerified

Checks if a player is verified.

Signature:

public bool _IsVerified(VRCPlayerApi p)

Parameters:

  • p - The player to check

Returns:

  • true if the player is verified
  • false if the player is not verified or player data is not found

Example:

VRCPlayerApi player = Networking.LocalPlayer;

if (bouncerSystem._IsVerified(player))
{
Debug.Log("Player is verified!");
// Allow access to verified-only areas
}

_ReloadToggleableObjects

Reloads and updates all toggleable objects based on the local player's current security and verification status.

Signature:

public void _ReloadToggleableObjects()

Behavior:

  • Toggles security-only objects based on security status
  • Toggles verified-only objects based on verification status
  • Respawns the local player if RespawnOnUnverify is enabled and the player is not verified

_CheckSecurityList

Checks the security list and logs the local player in if they are authorized as security.

Signature:

public void _CheckSecurityList()

Behavior:

  • Does not reset verified status
  • Checks multiple security sources in priority order:
    • Instance owner (if IOIsSecurity is enabled)
    • Plain text security list
    • Security Keypad integration (if available)
    • Keypad verified role (if available)
    • External security list from URL (if configured)
  • Sets the appropriate security level based on login method
  • Loads external security lists asynchronously if URL is provided

_UpdateAllUsers

Refreshes the whole GUI getting the updated values of each player verified and security status.

Signature:

public void _UpdateAllUsers()

Behavior:

  • Updates the display for all BouncerUserData components.
  • Useful to make sure all values are up to date, try to avoid using it often.

Accessing User Data Directly

The BouncerUserData script contains a synced value byte _securityLevel that represents if the user is:

  • 0 = unverified
  • 1 = verified
  • 2 = temporal security
  • 3 > permanent security

This value is private and can only be accessed by the SecurityLevel property, which can be get by anyone but only edited by the owner of the player object.

You can also access IsVerified, IsSecurity and CanRemove directly from the player object, tho it is advised to do so from the bouncer system.

You can call UpdateGUI() to refresh only that specific players toggle states.