# Description of Changes
A follow-on to #5133 that fixes another Godot flake that was observed
after #5133 merged. Specifically a C# SDK regen flake where the Godot
package restore path reused `sdks/csharp/packages`, which is also the
Unity-visible package cache.
During `cargo regen csharp dlls`, the Godot flow previously did this:
- cleared `sdks/csharp/packages/godotsharp`
- cleared `sdks/csharp/obj~/godot`
- restored the Godot project back into `sdks/csharp/packages`
- packed the Godot project using that same Unity-visible package area
That meant a Godot-only cleanup could delete package content under the
Unity SDK package cache. If a previous GodotSharp restore was partial or
stale, regen tried to fix it by deleting `packages/godotsharp`, but that
path is visible to Unity and can cause dirty/missing package content
during regen.
With this change, Godot restore state is now isolated under
`sdks/csharp/obj~/godot/packages`, and the regen flow becomes:
- clear only `sdks/csharp/obj~/godot`
- restore the Godot project into `sdks/csharp/obj~/godot/packages`
- pack the Godot project under the same path
Clearing `obj~/godot` now removes both Godot intermediates and
Godot-only NuGet packages, while leaving the normal Unity SDK package
cache under `sdks/csharp/packages` untouched.
# API and ABI breaking changes
N/A
# Expected complexity level and risk
1
# Testing
- [x] `unity-testsuite` passes
# Description of Changes
Harden `cargo regen csharp dlls` against flaky Godot restore/build state
in the Unity test suite.
I suspect this flake is runner specific. Some Unity runners appear to
have incomplete Godot package state, where
`sdks/csharp/packages/godotsharp` exists but is missing
`GodotSharp.dll`. In that state, NuGet can still report restore success
and generate a `project.assets.json` that contains `GodotSharp` metadata
but no usable compile asset.
The regen flow now removes the Godot MSBuild intermediate directory
(`sdks/csharp/obj~/godot`) before restoring
`SpacetimeDB.ClientSDK.Godot.csproj`. It also clears the targeted
`GodotSharp` package cache (`sdks/csharp/packages/godotsharp`) so NuGet
cannot reuse a partially restored package missing `GodotSharp.dll`.
After restore, `regen` parses `project.assets.json` and verifies that
`GodotSharp` is present and that the referenced `GodotSharp.dll` exists
before running `dotnet pack --no-restore`.
This should either prevent the flaky missing-`Godot` namespace failure,
or fail earlier with a clearer restore/package-state error.
NOTE/WARNING: This code was entirely AI generated.
# API and ABI breaking changes
N/A
# Expected complexity level and risk
~
# Testing
- [x] `unity-testsuite` passes (I ran it at least 5 times to try to get
it scheduled to different runners)
# 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
1. There's really no risk for current systems or projects, it's all new
additions to support nicely(-ish) Godot, new Blackholio demo for Godot
and updates to the tutorials.
# Testing
- [X] Follow the tutorial and verify everything works.
- [X] Build for Windows and verify it works.
- [x] Build for Linux and verify it works.
- [x] Build SDK
- [x] Publish to Nuget
---------
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>