Godot SDK and Blackholio tutorial#4920
Conversation
rekhoff
left a comment
There was a problem hiding this comment.
I was only able to get part-way through docs/docs/00100-intro/00300-tutorials/00500-godot-tutorial/00300-part-2.md before hitting a blocker with the implementation.
The tutorial so far it looks good with only some minor nits, but the NuGet package issue will need to get addressed before I can finish reviewing.
| import TabItem from '@theme/TabItem'; | ||
|
|
||
|
|
||
|  |
There was a problem hiding this comment.
Update this with a screenshot of the Godot implementation, or removed it from the tutorial for now.
|
|
||
| ### Step 1: Create a Blank Godot Project | ||
|
|
||
| SpacetimeDB supports Godot version `4.6.2` or later. See [the overview](.) for more information on specific supported versions. |
There was a problem hiding this comment.
I think this link is broken. Also, when going to download Godot 4.6.2, for Windows, macOS, and Linux, there is a Standard and a .NET install. I don't see all call out to use the .NET (on the download page it does say ".NET builds offer support for C# as a scripting language.", but it might be good to call out the .NET version, unless either will work.
|
|
||
|  | ||
|
|
||
| 2. **Rename the GameObject**: |
There was a problem hiding this comment.
| 2. **Rename the GameObject**: | |
| 2. **Rename the root Node**: |
| } | ||
| } | ||
| } | ||
| #elif GODOT |
There was a problem hiding this comment.
I don't believe this will work to allow Godot to have code only relevant to it within the NuGet packages. Unity is able to get away with unique build flags because we have Unity developers Import the SpacetimeDB SDK using the C# SDK repo. This means for Unity developers, the original code is intact and constants like UNITY_5_3_OR_NEWER and UNITY_EDITOR are evaluated locally. Only the SpacetimeDB.BSATN.Codegen.dll and SpacetimeDB.BSATN.Runtime.dll are pre-built head of time.
When we publish the NuGet packages for the general C# developers, that will strip out the GODOT build flag because it's not included as a constant during compilation. If we did include it, that would make it available to all SDK users (which of course would break things since it's specifically imports using Godot.
We'll likely need another approch than using GODOT build flags, or would need to make a custom target framework specifically for this.
For additional context, if we follow the tutorial, but point at a local NuGet package build from the lisandro/godot-blackholio branch, we'd get the errors like:
GameManager.cs(43,23): Error CS0117 : 'AuthToken' does not contain a definition for 'TryGetToken'
GameManager.cs(49,9): Error CS0103 : The name 'STDBUpdateManager' does not exist in the current contextAnd again, this is because the code is getting stripped out.
| * * This class is only used in Godot projects. | ||
| * * | ||
| */ | ||
| #if GODOT |
There was a problem hiding this comment.
See my other note about this getting stripped out from the NuGet package during compilation.
| #elif GODOT | ||
| new GodotDebugLogger(); |
There was a problem hiding this comment.
Again, see my other note about this getting stripped out from the NuGet package during compilation.
| @@ -0,0 +1,110 @@ | |||
| #if GODOT | |||
There was a problem hiding this comment.
And one more: see my other note about this getting stripped out from the NuGet package during compilation.
Description of Changes
Very small additions to the C# SDK specific for Godot.
I wrote the Godot Blackholio tutorial and updated the Unity one.
I added the image assets necessary for the tutorial.
I added the files for the Godot demo.
API and ABI breaking changes
No breaking changes.
Expected complexity level and risk
Testing