-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# codegen making state relative to a DbConnection #1869
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested via clockworklabs/com.clockworklabs.spacetimedbsdk#176
Code looks good to me, thanks @lcodes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ingvar left some requested changes here: clockworklabs/com.clockworklabs.spacetimedbsdk#168 (comment)
I'm temporarily removing my approval so that he has an opportunity to review here
70d929c
to
7b083e2
Compare
@RReverser updated, should be good to go now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits, but fine to go as-is too.
405cd7a
to
65220bf
Compare
2caee9e
to
2264653
Compare
## Description of Changes *Describe what has been changed, any new features or bug fixes* - switched our "already connected" logic to using a reference to a `MonoBehaviour` instead of just a bool. `MonoBehaviour`s are typically destroyed when a scene reload happens and in this case we'll want to allow developers to spawn a new `SpacetimeDBNetworkManager` if the previous one has been destroyed. ## API This is *not* an API break. - [ ] This is an API breaking change to the SDK *If the API is breaking, please state below what will break* ## Requires SpacetimeDB PRs *List any PRs here that are required for this SDK change to work* - clockworklabs/SpacetimeDB#1869 ## Testsuite SpacetimeDB branch name: master ## Testing *Write instructions for a test that you performed for this PR* - [x] I have added in several new tests here, one of which is a reconnection test. Also, the reason why we couldn't have more than 1 test before this is that it was required for reconnections to be working in order to have multiple tests running in the testsuite. Now that we have fixed reconnections I have enabled all of the tests. Testsuite passes ![image](https://github.com/user-attachments/assets/09ef5835-f2c7-41f1-af6b-e612ac5e0497) --------- Co-authored-by: John Detter <no-reply@boppygames.gg> Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com> Co-authored-by: Jeremie Pelletier <jeremiep@gmail.com> Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Description of Changes
Make the static fields indexing primary keys instance fields.
API and ABI breaking changes
Expected complexity level and risk
Testing
Codegen compiles. Same code as before but going through a
this
pointer instead of astatic
.Context from Boppy: The Unity testsuite exercises this feature in the testsuite: clockworklabs/com.clockworklabs.spacetimedbsdk#168