Admin - Prefab

UI for game commands and cheats [DVTL-Admin-Prefab]

Overview

This guide includes everything needed to use the Admin Flow Feature Prefab in the "Beamable SDK for Unity". Or watch this video.

The purpose of this feature is to offer the game maker an in-game UI for executing game commands and cheats.

With the power of built-in and custom console commands, game makers can expose any c# functionality to the Admin console. This helps during game development, game debugging, and customer support of live game titles.

Usage

The Admin Flow can be opened at runtime in multiple ways...

  • Within the Unity Editor, press the “~” key
  • Within a Mobile Build, use a "three-finger swipe-up gesture"

The User Interface

When set up properly, the player's user interface in the game project will be as follows:

516516

The Beamable "Admin Flow" UI in the Unity Game Window

Steps

Follow these steps to get started:

StepDetail
1. Open the "Toolbox" Window• Unity → Window → Beamable → Open Beamable Toolbox
2. Add the "Admin Flow" Prefab• Drag this Prefab from the Beamable Toolbox Window to the Unity Hierarchy Window

Here is the "Beamable" menu as seen in Unity:

602602

The “Beamable” Menu

Here is the feature Prefab as seen in the Beamable Toolbox.

701701

The Beamable "Admin Flow" in the Beamable Toolbox Window

📘

Related Guides

A common use case for the feature is covered in the guides.

Admin Commands

Once the Admin Flow is open, type an admin command into the input field and press return.

There are built-in Beamble admin commands and game makers can create custom admin commands for additional functionality.

Using Beamable Admin Commands

CommandDetail
helpShows the list of all admin commands
TRACK_PAYMENTTrack a test payment audit
ECHO <message>Repeat message to console.
WHERE <command>Find where a specific console command was registered from, if it was registered with a DBeamConsoleCommand attribute
account_toggleemit an account management toggle event
account_listlist user data
IDFAprint advertising identifier
RESETClear the access token and start with a fresh account
LOCALNOTE [<delay> [<title> [<body>]]]Send a local notification. Default delay is 10 seconds.
TIMESCALE <value> | variableSets the current timescale
SUBSCRIBER_DETAILSQuery subscriber details
DBIDShow current player DBID
ENTITLEMENTS <symbol> <state>Show current player entitlements
HEARTBEAT <dbid>Get heartbeat of a user
LOGIN_ACCOUNT <email> <password> Log in to the DBID designated by the given username and password
MAIL_GET <category>Get mailbox messages
MAIL_UODATE <id> <state> <acceptAttachments> Update a mail
REGISTER_ACCOUNT <email> <password>Registers this DBID with the given username and password
EXPIRE_TOKENExpires the current access token to trigger the refresh flow
CORRUPT_TOKENCorrupts the current access token to trigger the refresh flow
TEST-ANALYTICSRun 1000 events to test batching/load
IAP_BUY <listing> <sku>Invokes the real money transaction flow to purchase the given item_symbol.
IAP_PENDINGDisplays pending transactions

Advanced

This section contains any advanced configuration options and workflows.

Force-Enabled

Within the Unity Editor, press the “~” key to open the in-game console. This always works, regardless of player privileges or "Admin Flow" settings.

On device, use a three-finger swipe gesture to open the in-game console. This only works if the player has sufficient privileges, or if the "Admin Flow" settings specify the console should always be available.

📘

Best Practice

These hints make efficent use of concepts and workflows.

  • For security reasons, it is not recommended to allow a players to access the in-game console. Beamable has precautions in place to prevent this.

The in-game console, on-device, will only appear if the force-enabled checkbox is true, or if the current player's account has tester, developer, or admin privileges.

The Portal allows game makers to grant player privileges. This privilege-requirement only applies to device, not the Unity Editor.