Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Replace **PATH-TO-MODULE-DIRECTORY** with the path to your module's directory, w

```bash
mkdir -p module_bindings
spacetime generate --lang cs --out-dir module_bindings --module-path PATH-TO-MODULE-DIRECTORY
spacetime generate --lang csharp --out-dir module_bindings --module-path PATH-TO-MODULE-DIRECTORY
```

This generates C# files in `module_bindings/`. The generated files are automatically included in your project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Each SpacetimeDB client depends on some bindings specific to your module. Create

```bash
mkdir -p module_bindings
spacetime generate --lang cs --out-dir module_bindings --module-path PATH-TO-MODULE-DIRECTORY
spacetime generate --lang csharp --out-dir module_bindings --module-path PATH-TO-MODULE-DIRECTORY
```

Replace `PATH-TO-MODULE-DIRECTORY` with the path to your SpacetimeDB module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ A connection to a remote database is represented by the `UDbConnection` class. T
| Name | Description |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [Connect to a database](#connect-to-a-database) | Construct a UDbConnection instance. |
| [Advance the connection](#advance-the-connection-and-process-messages) | The connection processes messages automatically via WebSocket callbacks. |
| [Advance the connection](#advance-the-connection-and-process-messages) | Process queued messages by ticking the connection. |
| [Access tables and reducers](#access-tables-and-reducers) | Access the client cache, request reducer invocations, and register callbacks. |

### Connect to a database
Expand Down Expand Up @@ -186,7 +186,29 @@ Finalize configuration and open the connection. This creates a WebSocket connect

### Advance the connection and process messages

The Unreal SDK processes messages automatically via WebSocket callbacks and with UDbConnection which ultimately inherits from FTickableGameObject. No manual polling or advancement is required. Events are dispatched through the registered delegates.
The Unreal SDK queues incoming messages and dispatches callbacks when the connection is ticked. If the connection is never ticked, subscription updates and reducer callbacks will not be applied to your client cache.

You can tick the connection manually from an actor's `Tick` method:

```cpp
void AGameManager::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);

if (Conn && Conn->IsActive())
{
Conn->FrameTick();
}
}
```

Or enable automatic ticking once after the connection is created:

```cpp
Conn->SetAutoTicking(true);
```

Both approaches process queued messages on the game thread and dispatch events through the delegates registered on the connection.

### Access tables and reducers

Expand Down
Loading