Initializing the Client
Create a client with a configuration object that specifies the auth URL and region configs. For local development, use dev auth to bypass the normal authentication flow.- Unity C#
- TypeScript
Authentication
Sign in to authenticate the user. You can retrieve the current user’s information and persona after signing in.- Unity C#
- TypeScript
- Unity C#
- TypeScript
Connecting to a Shard
A shard is a single instance of your game world running on the server. The shard client is your connection to that instance, allowing you to query entities, send commands, and subscribe to events. To connect, specify the shard’s address (region, organization, project, and shard ID) and call connect to get a shard client.- Unity C#
- TypeScript
- Unity C#
- TypeScript
Querying Entities
To query entities, define client-side classes with field mappings that correspond to component field names on the server. Build queries to specify which components to find and how to match them. See Queries for more details.- Unity C#
- TypeScript
Sending Commands
Build a command payload and send it to the shard. See Commands for more details.- Unity C#
- TypeScript
Subscribing to Events
Subscribe to events with handler callbacks. See Events for more details.- Unity C#
- TypeScript
- Unity C#
- TypeScript