Skip to main content

API and Addons

Documentation version

This API reference was last updated for Admin Tablet 7.0.0-Beta.2.

Add the valenvrc.AdminTablet runtime assembly to your UdonSharp assembly definition, then import its namespace:

using valenvrc.AdminTablet;

Tablet API​

MemberResult
CheckAccess(string[] entries)Checks the local player against the selected security mode.
CheckAccess(string[] entries, VRCPlayerApi player, bool isBypass = false)Checks a specific player. isBypass only suppresses the missing-permission notification.
IsActiveTab(GameObject tab)Returns whether the GameObject is below the active parent.
IsActiveTab(TabletTab tab)Returns whether the tab is below the active parent.
_ChangeTab(TabletTab tab)Opens a connected tab and closes the player profile.
_CloseProfile()Clears the selected target and returns to the moderation tab.
targetCurrently selected player, or null when no profile is open.
localPlayerThe local VRChat player cached during initialization.
notificationSystemThe tablet's assigned notification system.

An empty entries array grants access. In Player Tags mode, an empty Tag Name also grants access.

Notification API​

MethodResult
CustomLog(string message)Writes an Info message when logs and the current debug level allow it.
CustomLog(string message, DebugMode logType)Writes a message at the selected log level.
ShowNotification(string text, Sprite icon = null, AudioClip sound = null)Shows a notification for the configured duration.

Create a module​

  • Inherit from TabletModule for an unrestricted module.
  • Inherit from RestrictedTabletModule when the module needs permission entries.
  • Override OnInitialize() for setup that needs the tablet reference.
using valenvrc.AdminTablet;

public class ExampleModule : RestrictedTabletModule
{
protected override void OnInitialize()
{
tablet.notificationSystem.CustomLog("ExampleModule initialized");
}

public void RunAction()
{
if (!EnsureInitialized()) return;
if (!HasPermission()) return;

tablet.notificationSystem.ShowNotification("Action completed");
}
}

For networked actions, validate each [NetworkCallable] receiver with the base helpers that apply: EnsureInNetworkCall(), EnsureCallerOwnership(), and EnsureCallerPermission(). Public module methods marked [NetworkCallable] are receivers for the supplied network flow; do not call them locally as shortcuts.

To expose a module prefab in Add New Module, add it to Packages/com.valenvrc.admin_tablet/Editor/AvailableModulesData.asset. The current editor does not provide module categories.