You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/00200-core-concepts/00600-clients/00300-connection.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,9 +174,9 @@ The token is sent to the server during connection and validates your identity. S
174
174
175
175
:::danger[Critical: C#, Unity, and Unreal Users]
176
176
177
-
In C# (including Unity) and Unreal Engine, you **must** manually advance the connection to process incoming messages. The connection does not process messages automatically!
177
+
In C# (including Unity), you **must** manually advance the connection to process incoming messages. In Unreal Engine, you must either manually advance the connection or enable automatic ticking. If the connection is not advanced, it will not process messages.
178
178
179
-
Call `DbConnection.FrameTick()` in your game loop or update method:
179
+
Call `FrameTick()` in your game loop or update method:
180
180
181
181
<Tabs groupId="client-language" queryString>
182
182
<TabItem value="csharp" label="C#">
@@ -200,7 +200,7 @@ while (running)
200
200
<TabItemvalue="unreal"label="Unreal">
201
201
202
202
```cpp
203
-
//In your Actor's Tick() method
203
+
//Option 1: call FrameTick() from your Actor's Tick() method
|[Connect to a database](#connect-to-a-database)| Construct a UDbConnection instance. |
61
-
|[Advance the connection](#advance-the-connection-and-process-messages)|The connection processes messages automatically via WebSocket callbacks.|
61
+
|[Advance the connection](#advance-the-connection-and-process-messages)|Process queued messages with `FrameTick` or automatic ticking. |
62
62
|[Access tables and reducers](#access-tables-and-reducers)| Access the client cache, request reducer invocations, and register callbacks. |
63
63
64
64
### Connect to a database
@@ -186,7 +186,50 @@ Finalize configuration and open the connection. This creates a WebSocket connect
186
186
187
187
### Advance the connection and process messages
188
188
189
-
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.
189
+
The Unreal SDK queues network messages and applies them to the generated client cache on tick. If you do not arrange for the connection to tick, table callbacks, reducer callbacks, and subscription callbacks will not be dispatched.
190
+
191
+
You can either call `FrameTick()` yourself from an Actor or component tick, or enable the SDK's automatic ticker once after building the connection:
0 commit comments