Developers/SDK for Unity
EzAdmin SDK for Unity
One package that connects your Unity game to Discord. A setup wizard does most of the work.
using EzAdmin.Client;
int xp = Mathf.RoundToInt(baseXp * EzAdminClient.Multiplier);
float dropRate = EzAdminGame.GetFloat("drop_rate", 1f);
EzAdminClient.Instance.ReportPurchase(transactionId);Supported platforms
Players sign in with their Meta Quest account. The VR link board comes ready made.
- Meta Quest
What's in the package
| Part | What it does |
|---|---|
EzAdminClient | Connects the game to your EzAdmin: kicks, mutes, freezes, live events, announcements, the Staff Panel, purchases and gifting |
EzAdminAuth | Signs players in to PlayFab the right way on each platform |
EzAdminLinkScreen | The ready made Link Discord button on screen, or board in VR |
EzAdminLink | Linking from your own UI and keyboard |
EzAdminItems, EzAdminItemUnlock | Items players get from their Discord roles |
EzAdminAntiCheat | Mod loaders, injected code, debuggers, memory editing, rooted devices, hooking tools and modified copies, reported to your Discord. About anti tamper |
EzAdminGame | Game settings and news from the dashboard's Game Control tab, kept on the device between launches |
EzSecureInt, EzSecureFloat, EzSecureLong | Numbers memory editors cannot find or change |
EzAdminProfiles, EzAdminProfileView | Discord names and pictures on your leaderboards |
Samples/EzAdminSamples.cs | A short example of every part |
API
Everything else is handled for you. These are the calls and events for when your game wants to do something itself.
| Call or event | What it is for |
|---|---|
EzAdminGame.GetFloat(key, fallback), GetInt, GetBool, GetString | Read a game setting. The last copy is kept on the device, so it works from the first frame |
EzAdminGame.News, Changed | The live news posts, and an event when anything in the game settings or news changed |
Instance.ReportPurchase(id) | Record a purchase and send the buyer a receipt. Pass PlayFab's item instance id or transaction id; EzAdmin checks it with PlayFab |
Instance.SendCurrency(to, amount, note, done) | Send some of this player's currency to another player, within the server's transfer rules |
EzAdminAntiCheat.Report(detail) | Report something your own code found, like an impossible score |
EzAdminClient.Multiplier, EventChanged | The live event's multiplier: 1 when nothing is on, so you can always multiply rewards by it |
EzAdminClient.Announcement | Staff sent a message with /announce. A banner shows if you add nothing |
EzAdminClient.FreezeChanged, IsFrozen | Stop your player controller while a moderator has the player frozen |
EzAdminClient.Kicked, ShutdownScheduled | Show your own screen before the game closes |
EzAdminClient.IsStaff, StaffChanged | Show staff only buttons. Opening the Staff Panel is checked again by EzAdmin |
Instance.ReportPlayer(id, name, reason, done) | Your Report button. The report arrives in Discord with the buttons to act |
Example
The setup wizard also writes a starter script into your project with the common events already handled, so you only fill in what your game does. This is the kind of thing that goes in it.
The rule that matters. Code in a player's game can be changed. Anything that pays out, unlocks something or lets a player talk is decided on a server or in PlayFab CloudScript. The SDK is built that way: receipts are checked with PlayFab, transfers are carried out by EzAdmin, and anti tamper actions are switched on on the dashboard.
using EzAdmin.Client;
using UnityEngine;
public class MyGameEzAdmin : MonoBehaviour
{
void OnEnable()
{
EzAdminClient.FreezeChanged += frozen =>
Player.Local.enabled = !frozen;
EzAdminGame.Changed += () =>
Spawner.Rate = EzAdminGame.GetFloat("spawn_rate", 1f);
}
public int Reward(int coins) =>
Mathf.RoundToInt(coins * EzAdminClient.Multiplier);
}
Try it on your server
It's free to start. No card needed, and you can remove it any time.