From ae19b7b73016ef05f9801f2608e497b6a0df53b1 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Wed, 11 Dec 2024 17:30:45 +0000 Subject: [PATCH] Various fixes --- .github/workflows/unity-test.yml | 8 -------- src/SpacetimeDBClient.cs | 8 ++++---- unity-tests~ | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unity-test.yml b/.github/workflows/unity-test.yml index a3ffdde..568c164 100644 --- a/.github/workflows/unity-test.yml +++ b/.github/workflows/unity-test.yml @@ -41,14 +41,6 @@ jobs: echo "branch=$branch" >> $GITHUB_OUTPUT echo "Final branch name: $branch" - - name: Replace com.clockworklabs.spacetimedbsdk in manifest.json - run: | - # Get the branch name from the environment variable - branch_name="${{ github.head_ref }}" - # Replace any reference to com.clockworklabs.spacetimedbsdk with the correct GitHub URL using the current branch - sed -i "s|\"com.clockworklabs.spacetimedbsdk\":.*|\"com.clockworklabs.spacetimedbsdk\": \"https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk.git#$branch_name\",|" unity-tests~/client/Packages/manifest.json - - cat unity-tests~/client/Packages/manifest.json - name: Replace spacetimedb dependency in Cargo.toml run: | # Get the branch name from the environment variable diff --git a/src/SpacetimeDBClient.cs b/src/SpacetimeDBClient.cs index c9d7d70..a236c49 100644 --- a/src/SpacetimeDBClient.cs +++ b/src/SpacetimeDBClient.cs @@ -39,7 +39,7 @@ public DbConnection Build() #if UNITY_5_3_OR_NEWER if (SpacetimeDBNetworkManager._instance != null) { - SpacetimeDBNetworkManager._instance.AddConnection(conn); + SpacetimeDBNetworkManager._instance.AddConnection(conn); } #endif return conn; @@ -177,8 +177,8 @@ protected DbConnectionBase() { if (SpacetimeDBNetworkManager._instance != null) { - SpacetimeDBNetworkManager._instance.RemoveConnection(this); - } + SpacetimeDBNetworkManager._instance.RemoveConnection(this); + } }; #endif @@ -903,7 +903,7 @@ void IDbConnection.Subscribe(ISubscriptionHandle handle, string[] querySqls) } /// Usage: SpacetimeDBClientBase.instance.OneOffQuery("SELECT * FROM table WHERE sender = \"bob\""); - [Obsolete("This is replaced by ctx.Db.TableName.OneOffQuery(\"WHERE ...\")", false)] + [Obsolete("This is replaced by ctx.Db.TableName.RemoteQuery(\"WHERE ...\")", false)] public Task OneOffQuery(string query) where T : IDatabaseRow, new() => ((IDbConnection)this).RemoteQuery(query); diff --git a/unity-tests~ b/unity-tests~ index 7bd49c0..ca4fac7 160000 --- a/unity-tests~ +++ b/unity-tests~ @@ -1 +1 @@ -Subproject commit 7bd49c04d0fdbb0ab454eb08ce62238334d8855e +Subproject commit ca4fac762831fe613d154a6be2f058c504ba4f0b