From 0e5f200a4dbcafae928b6cc24d667aac30881402 Mon Sep 17 00:00:00 2001 From: T-Podgorski <147391857+T-Podgorski@users.noreply.github.com> Date: Sat, 15 Nov 2025 01:23:00 +0100 Subject: [PATCH 1/2] Update 03-part-2.md Fixed client module bindings autogen location in a CLI call. The old command generates the bindings outside of the Unity project's actual Assets folder and they can't be seen by the GameManager script. It's also inconsistent with the project structure presented at the beginning of part 2. The new command is consistent with part 3 of the tutorial, where the bindings are being regenerated. Signed-off-by: T-Podgorski <147391857+T-Podgorski@users.noreply.github.com> --- docs/docs/03-Unity Tutorial/03-part-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/03-Unity Tutorial/03-part-2.md b/docs/docs/03-Unity Tutorial/03-part-2.md index 4dca41cfc4b..26d148d4b52 100644 --- a/docs/docs/03-Unity Tutorial/03-part-2.md +++ b/docs/docs/03-Unity Tutorial/03-part-2.md @@ -510,7 +510,7 @@ The `spacetime` CLI has built in functionality to let us generate C# types that ```sh -spacetime generate --lang csharp --out-dir ../client-unity/Assets/autogen # you can call this anything, I have chosen `autogen` +spacetime generate --lang csharp --out-dir ../Assets/module_bindings # you can call this anything, I have chosen `autogen` ``` This will generate a set of files in the `client-unity/Assets/autogen` directory which contain the code generated types and reducer functions that are defined in your module, but usable on the client. From 0c42ccbdf0e1d51d09a5a6711fe5ee7abf43f9b7 Mon Sep 17 00:00:00 2001 From: T-Podgorski <147391857+T-Podgorski@users.noreply.github.com> Date: Sat, 15 Nov 2025 01:47:07 +0100 Subject: [PATCH 2/2] Update 03-part-2.md Edited other context that mentions the fixed generate command. Signed-off-by: T-Podgorski <147391857+T-Podgorski@users.noreply.github.com> --- docs/docs/03-Unity Tutorial/03-part-2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/03-Unity Tutorial/03-part-2.md b/docs/docs/03-Unity Tutorial/03-part-2.md index 26d148d4b52..568fe24bc25 100644 --- a/docs/docs/03-Unity Tutorial/03-part-2.md +++ b/docs/docs/03-Unity Tutorial/03-part-2.md @@ -510,10 +510,10 @@ The `spacetime` CLI has built in functionality to let us generate C# types that ```sh -spacetime generate --lang csharp --out-dir ../Assets/module_bindings # you can call this anything, I have chosen `autogen` +spacetime generate --lang csharp --out-dir ../Assets/module_bindings # you can call this anything, I have chosen `module_bindings` ``` -This will generate a set of files in the `client-unity/Assets/autogen` directory which contain the code generated types and reducer functions that are defined in your module, but usable on the client. +This will generate a set of files in the `blackholio/Assets/module_bindings` directory which contain the code generated types and reducer functions that are defined in your module, but usable on the client. ``` ├── Reducers @@ -534,7 +534,7 @@ This will generate a set of files in the `client-unity/Assets/autogen` directory └── SpacetimeDBClient.g.cs ``` -This will also generate a file in the `client-unity/Assets/autogen/SpacetimeDBClient.g.cs` directory with a type aware `DbConnection` class. We will use this class to connect to your database from Unity. +This will also generate a file in the `Assets/module_bindings/SpacetimeDBClient.g.cs` directory with a type aware `DbConnection` class. We will use this class to connect to your database from Unity. > IMPORTANT! At this point there will be an error in your Unity project. Due to a [known issue](https://docs.unity3d.com/6000.0/Documentation/Manual/csharp-compiler.html) with Unity and C# 9 you need to insert the following code into your Unity project. >