Mind Invaders Games logoMIND INVADERSGAME STUDIO

Documentation overview / Server examples and integration contracts

Server examples and integration contracts

On this page

The package includes a read-only Legacy CloudScript example, hubGetServerTime.js.txt, in ServerExamples~ for UPM or ServerExamples for an Asset Store import. It returns { "ok": true, "utc": "..." } for the current authenticated player. It performs no grants, moderation, or account creation.

  1. Copy the example into your project's configured CloudScript source folder (default Assets/Editor/PlayFabAdmin/CloudScripts). Remove the .txt suffix.
  2. Open Tools > MoDev > PlayFab Hub > Hub > Admin > Cloud Scripts. Inspect the file preview and keep DRY-RUN enabled first.
  3. For a first deployment, explicitly choose Replace only. For an existing title, Deploy (merge) replaces main.js and preserves other files from the current revision. A failed/malformed live read aborts the merge. Keep the current revision as a rollback reference.
  4. Deploy to a disposable title, log in, and call PlayFabHub.CloudScript.ExecuteChecked<ServerTime>("hubGetServerTime", null, callback), where ServerTime has public bool ok; public string utc;.

Your game owns secure gameplay policies. No daily rewards, offer eligibility, arbitrary score validation, receipt backend, or production moderation handlers are supplied. Validate authorization and all untrusted arguments on the server. Using a CloudScript caller does not make client-provided scores or grant amounts trustworthy.

Optional UGC panel adapter

Catalog inspection is available without handler configuration. Write actions remain inactive in effect until you configure these names in the Admin config Inspector and deploy implementations to your title:

Config field Arguments sent Expected result
moderationHandler configured item argument, decision (keep/remove), moderatorId {ok:true} or {ok:false,reason:"..."}
featureHandler configured item argument, cost {ok:true} or {ok:false,reason:"..."}
rotateFeaturedHandler empty object {rotated:[...]}

ugcItemArgument defaults to itemId; use levelId only if an existing handler requires it. Every invocation requires a valid Moderator PlayFabId and uses the server ExecuteCloudScript endpoint from the editor. There is no fabricated scheduler player. Empty handler names fail locally, and all writes respect DRY-RUN.

These fields adapt existing workflows; they do not establish a moderation policy. Authorize the actual caller, verify item ownership/content type, and derive prices and entitlements from server-controlled data. Never trust the client-supplied moderatorId or cost as authorization. Hiding an item in DisplayProperties is not a server-enforced access restriction.

For a game with no existing moderation backend, implement and test that backend before enabling these actions. The package does not advertise these adapters as a turnkey moderation service.


Mind Invaders Games · PlayFab Hub 1.0.0 · Updated 14 September 2026