Skip to main content

API

Documentation version

This API reference was last updated for Bouncer System 2.4.0.

To start, add a reference to valenvrc.BouncerSystem to your UdonSharp script:

using valenvrc.BouncerSystem;

You may also need to add the runtime reference assembly to your own UdonSharp assembly definition file. See UdonSharp Assembly Definitions for details.

Quick reference​

MethodResult
_VerifyPlayer(VRCPlayerApi player)Verifies an eligible player when called by a Security user.
_IsSecurity(VRCPlayerApi player)Returns true for Temporary or automatic Security.
_IsVIP(VRCPlayerApi player)Returns true for VIP or any Security role.
_IsTempSecurity(VRCPlayerApi player)Returns true only for Temporary Security.
_IsVerified(VRCPlayerApi player)Returns true for Verified, VIP, or Security.
_ReloadToggleableObjects()Reapplies all Bouncer-managed objects for the local player.
_CheckSecurityList()Recalculates the local player's automatic role sources.
_UpdateAllUsers()Refreshes every player row in the Bouncer UI.

Query roles​

_IsVerified​

public bool _IsVerified(VRCPlayerApi player)

Returns true when the player has Verified-or-higher access.

_IsVIP​

public bool _IsVIP(VRCPlayerApi player)

Returns true when the player has VIP-or-higher access. This includes both Security levels.

_IsSecurity​

public bool _IsSecurity(VRCPlayerApi player)

Returns true for Temporary Security and automatic Security.

_IsTempSecurity​

public bool _IsTempSecurity(VRCPlayerApi player)

Returns true only when the player has manually assigned Temporary Security.

All query methods return false when the player's BouncerUserData cannot be found.

Verify a player​

public void _VerifyPlayer(VRCPlayerApi player)

Requests Verified access for the target player's owned data object. The local caller must be Security. It does not unverify users or replace VIP/Security status.

public void VerifyOwnerOf(GameObject targetObject)
{
VRCPlayerApi targetPlayer = Networking.GetOwner(targetObject);
bouncerSystem._VerifyPlayer(targetPlayer);
}

Refresh state​

_ReloadToggleableObjects​

public void _ReloadToggleableObjects()

Reapplies Security, VIP, Verified, and scanner objects for the local player. If RespawnOnUnverify is enabled and the local player is Unverified, it also respawns them.

_CheckSecurityList​

public void _CheckSecurityList()

Recalculates the local player's role from configured automatic sources and existing manual state. Call this after an integration changes a local membership that Bouncer System does not already observe.

_UpdateAllUsers​

public void _UpdateAllUsers()

Refreshes the checkmarks and controls for every player row. Avoid calling it repeatedly every frame.

Example: VIP-or-higher gate​

For simple access control, assigning objects to VIPObjectsOn or VIPObjectsOff in the Inspector is preferred. For custom logic:

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using valenvrc.BouncerSystem;

public class VIPGate : UdonSharpBehaviour
{
[SerializeField] private BouncerSystem bouncerSystem;
[SerializeField] private GameObject vipContent;

public void RefreshAccess()
{
VRCPlayerApi localPlayer = Networking.LocalPlayer;
bool allowed = Utilities.IsValid(localPlayer)
&& bouncerSystem != null
&& bouncerSystem._IsVIP(localPlayer);

if (vipContent != null)
{
vipContent.SetActive(allowed);
}
}
}

Call RefreshAccess() when your own integration needs to refresh. Do not poll it every frame.

BouncerUserData values​

Each player's BouncerUserData owns one synchronized SecurityLevel value:

ValueMeaning
0Unverified
1Verified
2VIP
3Temporary Security
4+Automatic Security

Its derived properties are IsVerified, IsVIP, IsSecurity, IsTempSecurity, and CanRemove.

Direct role mutation

BouncerUserData.SetVerified, SetVIP, and SetSecurity are validated network receivers. Direct local calls are rejected, and the _Set... methods are intended for the supplied UI. Use BouncerSystem for supported queries and scanner-style verification rather than writing SecurityLevel or calling those receivers directly.