Developer Docs
Game Development
Overview
TikPlay communicates with Unity games via the SendMessage API. Your game receives JSON event data through a specific method that you must implement.
TikTok Live → TikPlay Backend → Frontend (WebSocket) → Unity (SendMessage)
1. Create the _GameManagers GameObject
TikPlay sends all events to a GameObject named _GameManagers. This is a required naming convention.
- In your Unity scene, create an empty GameObject
- Name it exactly:
_GameManagers - Attach your TikTokEventManager script to this GameObject
Hierarchy Structure
Hierarchy:
└── _GameManagers ← REQUIRED NAME
└── TikTokEventManager (Script)Tip: The underscore prefix ensures the object appears at the top of the hierarchy and is easy to find.