-
Notifications
You must be signed in to change notification settings - Fork 41
Dylan/onboarding-upgrades #28
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
Merged
dylanh724
merged 12 commits into
clockworklabs:master
from
dylanh724:dylan/onboarding-upgrades
Mar 29, 2024
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
60472af
doc: Onboarding impr, fixes, consistency, cleanup
dylanh724 61629ad
doc: Onboarding impr, fixes, consistency, cleanup
dylanh724 45cc2d2
fix: Rm redundant 'module_bindings' mention
dylanh724 571a04b
fix: Floating period, "arbitrary", "important":
dylanh724 47b473b
fix: Mentioned FilterBy, used FindBy
dylanh724 4833cf7
fix(Unity-pt1): Rm copy+paste redundant comments
dylanh724 612a680
fix(unity): Rm unused using statement +merged info
dylanh724 d030309
refactor(minor): Code spacing for grouping/clarity
dylanh724 4986db6
feat: 'Standalone mode runs in foreground' memo
dylanh724 c12c0c8
refactor(unity-pt1): Standalone mode foreground memo
dylanh724 6e9b3c3
fix(syntaxErr): Fix err, keep FilterBy, handle null
dylanh724 58651ab
fix: Remote player `is null` check removal
dylanh724 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ To make changes to our docs, you can open a pull request in this repository. You | |
git clone ssh://[email protected]/<username>/spacetime-docs | ||
``` | ||
|
||
3. Make your edits to the docs that you want to make + test them locally (see Testing Your Edits below) | ||
3. Make your edits to the docs that you want to make + test them locally | ||
4. Commit your changes: | ||
|
||
```bash | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,10 @@ The SpacetimeDB client C# for Rust contains all the tools you need to build nati | |
- [Method `SpacetimeDBClient.Connect`](#method-spacetimedbclientconnect) | ||
- [Event `SpacetimeDBClient.onIdentityReceived`](#event-spacetimedbclientonidentityreceived) | ||
- [Event `SpacetimeDBClient.onConnect`](#event-spacetimedbclientonconnect) | ||
- [Subscribe to queries](#subscribe-to-queries) | ||
- [Query subscriptions & one-time actions](#subscribe-to-queries) | ||
- [Method `SpacetimeDBClient.Subscribe`](#method-spacetimedbclientsubscribe) | ||
- [Event `SpacetimeDBClient.onSubscriptionApplied`](#event-spacetimedbclientonsubscriptionapplied) | ||
- [Method `SpacetimeDBClient.OneOffQuery`](#event-spacetimedbclientoneoffquery) | ||
- [View rows of subscribed tables](#view-rows-of-subscribed-tables) | ||
- [Class `{TABLE}`](#class-table) | ||
- [Static Method `{TABLE}.Iter`](#static-method-tableiter) | ||
|
@@ -64,13 +65,11 @@ dotnet add package spacetimedbsdk | |
|
||
### Using Unity | ||
|
||
To install the SpacetimeDB SDK into a Unity project, download the SpacetimeDB SDK from the following link. | ||
To install the SpacetimeDB SDK into a Unity project, [download the SpacetimeDB SDK](https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/releases/latest), packaged as a `.unitypackage`. | ||
|
||
https://sdk.spacetimedb.com/SpacetimeDBUnitySDK.unitypackage | ||
In Unity navigate to the `Assets > Import Package > Custom Package` menu in the menu bar. Select your `SpacetimeDB.Unity.Comprehensive.Tutorial.unitypackage` file and leave all folders checked. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm, you're right, but I don't know that this name change was intentional.. @jdetter ? |
||
|
||
In Unity navigate to the `Assets > Import Package > Custom Package...` menu in the menu bar. Select your `SpacetimeDBUnitySDK.unitypackage` file and leave all folders checked. | ||
|
||
(See also the [Unity Tutorial](/docs/unity/part-1).) | ||
(See also the [Unity Tutorial](/docs/unity/part-1)) | ||
|
||
## Generate module bindings | ||
|
||
|
@@ -319,6 +318,15 @@ void Main() | |
} | ||
``` | ||
|
||
### Method [`OneTimeQuery`](#method-spacetimedbclientsubscribe) | ||
|
||
You may not want to subscribe to a query, but instead want to run a query once and receive the results immediately via a `Task` result: | ||
|
||
```csharp | ||
// Query all Messages from the sender "bob" | ||
SpacetimeDBClient.instance.OneOffQuery<Message>("WHERE sender = \"bob\""); | ||
``` | ||
|
||
## View rows of subscribed tables | ||
|
||
The SDK maintains a local view of the database called the "client cache". This cache contains whatever rows are selected via a call to [`SpacetimeDBClient.Subscribe`](#method-spacetimedbclientsubscribe). These rows are represented in the SpacetimeDB .Net SDK as instances of [`SpacetimeDB.Types.{TABLE}`](#class-table). | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I assume it caused some cryptic error with the square brackets? 😅
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.
'twas a cryptic err ;)