Skip to content

Commit dcd6c96

Browse files
committed
chore: ci update + docs update
1 parent 3c32fc9 commit dcd6c96

3 files changed

Lines changed: 43 additions & 34 deletions

File tree

.github/workflows/unity-tests-run.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ jobs:
213213
conclusion === "success"
214214
? "Unity EditMode tests passed."
215215
: "Unity EditMode tests failed.";
216+
const runLink = `${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`;
216217
const reportLine =
217218
reportOutcome && reportOutcome !== "success"
218219
? "Test report failed to publish."
@@ -223,6 +224,7 @@ jobs:
223224
`**Status:** ${conclusion === "success" ? "passed" : "failed"}`,
224225
statusLine,
225226
reportLine,
227+
`Run: ${runLink}`,
226228
"Manual rerun: `/run-unity-tests`",
227229
].filter(Boolean).join("\n");
228230

CONTRIBUTING.md

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
# How to Contribute
22

33
## Local Setup
4-
Setting up the project locally is similar to any other Unity project:
4+
5+
### Unity-only (most contributors)
6+
Use this if you are only editing C# code, assets, samples, or tests.
57
1. Ensure you have [Unity 2022.3.23f1](https://unity.com/releases/editor/whats-new/2022.3.23) installed.
6-
2. Install [NodeJS](https://nodejs.org/en) on your system.
7-
3. Fork the repository and clone it to your local drive.
8-
4. To build the plugin, run these commands in your terminal:
8+
2. Fork the repository and clone it to your local drive.
9+
10+
### JS bridge (only if you change the WebGL plugin)
11+
Node.js is only required to rebuild the WebGL JS bridge. The build step installs the upstream JS SDK and generates the `.jslib`/`.jspre` files used by Unity.
12+
1. Install [NodeJS](https://nodejs.org/en) on your system.
13+
2. Build the JS bridge:
914
```shell
1015
cd Tools/playroomkit-js
1116
npm install
1217
```
13-
This command will install the `upstream.sdk` and its dependencies. It also creates a `Playroom` folder inside `Assets/Plugins`, containing two files: a `.JSLIB` file and a `.JSPRE` file.
14-
5. Complete your setup by running `npm install` whenever changes are made to `Playroomkit/src/index.js`.
18+
This installs the upstream SDK and builds the WebGL plugin into `Packages/com.playroomkit.sdk/Runtime/Plugins/Playroom` (the `.jslib` and `.jspre` files).
19+
3. Re-run `npm install` (or `npm run build`) only when `Tools/playroomkit-js/src/index.js` changes.
1520

1621
## Resources
1722
- User-facing Documentation: https://docs.joinplayroom.com/usage/unity
@@ -39,30 +44,25 @@ To implement a new feature available in the upstream SDK:
3944
The process for implementing fixes from the upstream SDK mirrors other feature implementations, typically done within the `index.js` file.
4045

4146
### Architecture
42-
This package follows this folder structure:
47+
This package follows this folder structure (UPM layout):
4348
```
44-
PlayroomKit
45-
├── dependencies/
49+
Packages/com.playroomkit.sdk
50+
├── Assets/
4651
├── Editor/
47-
├── Examples/
48-
├── modules/
49-
├── node_modules/
50-
├── Prefabs/
51-
├── src/
52-
└── Tests/
53-
└── package.json
54-
└── package-lock.json
55-
└── Playroom.asmdef
56-
└── PlayroomKit.cs
57-
└── vite.config.js
52+
├── Runtime/
53+
├── Samples~/
54+
├── Tests/
55+
├── package.json
56+
├── Playroom.asmdef
57+
└── PlayroomKit.cs
5858
```
59-
The package also includes a custom WebGL template for Discord activities located in `Assets/WebGLTemplates`.
59+
The package also includes a custom WebGL template for Discord activities located in `Packages/com.playroomkit.sdk/Assets/WebGLTemplates`.
6060

6161
#### Modules
6262
Playroomkit comes with many [modules](https://docs.joinplayroom.com/components) which help with speeding up development. Unity SDK builds on top of that and adds its own modules such as MockMode.
6363
The folder structure is something like this:
6464
```
65-
modules
65+
Packages/com.playroomkit.sdk/Runtime/modules
6666
├── Helpers/
6767
├── Interfaces/
6868
├── MockMode/
@@ -85,4 +85,17 @@ modules
8585
- **PlayroomkitDevManager.cs**: Manager script for choosing between local and browser mockmode, this is used in the `PlayroomMockManager` prefab.
8686

8787
## Tests
88-
Tests are located in the `Playroomkit/Tests` folder and are currently editor-only. Install Unity Test Runner to execute tests via the `Window/General/Test Runner` menu.
88+
Tests are located in `Packages/com.playroomkit.sdk/Tests/Editor` and are currently editor-only. Install Unity Test Runner to execute tests via the `Window/General/Test Runner` menu.
89+
90+
## Samples
91+
Samples are distributed via the package and must be imported into your project to run them.
92+
1. Open `Window > Package Manager`.
93+
2. Select `PlayroomKit` in the list.
94+
3. In the `Samples` section, click `Import` on the sample you want to run.
95+
4. Open the imported sample scene from your project `Assets/` folder.
96+
97+
### Syncing sample changes
98+
If the package sample content changes, re-import the sample from the same Package Manager screen (`Samples` section > `Reimport`).
99+
100+
Do not edit the imported sample directly in `Assets/` if you want changes to persist upstream. The imported copy is not merged back into the package. If you must tweak something in an imported sample, also apply the same changes to the source sample under `Packages/com.playroomkit.sdk/Samples~` (or manually replace the updated files in the package sample).
101+

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This SDK is a wrapper over PlayroomKit JS. Currently, it only supports WebGL exp
2020

2121
See [PlayroomKit Unity docs](https://docs.joinplayroom.com/usage/unity) on how to use this SDK in your Unity project.
2222

23+
The SDK is distributed as a UPM package (not a `.unitypackage`). Source lives under `Packages/com.playroomkit.sdk`, and samples are under `Packages/com.playroomkit.sdk/Samples~`.
2324

2425
This beta version of the SDK might undergo changes that could break compatibility with previous versions, even without a major version update. To ensure stability, it's advisable to fix the usage to a particular package version. By doing so, you'll consistently install the same version and avoid unexpected changes, unless you deliberately seek the latest updates.
2526

@@ -32,28 +33,21 @@ This beta version of the SDK might undergo changes that could break compatibilit
3233

3334
You can search for help, or ask the community, in our [Discord channel](https://discord.gg/HGkSRAD8).
3435

35-
Found a bug, or want us to implement something? [Create an Issue](https://github.com/asadm/playroom-unity/issues/new) on GitHub.
36+
Found a bug, or want us to implement something? [Create an Issue](https://github.com/playroomkit/unity/issues/new) on GitHub.
3637

3738
### Creating a new release
3839

39-
Tag and push the tag to create a new release. The tag should be in the format `v0.Y.Z`. For example, `v0.0.20`.
40-
41-
```bash
42-
git tag v0.Y.Z
43-
git push origin --tags
44-
```
45-
46-
This will create a draft release [on GitHub](https://github.com/asadm/playroom-unity/releases). Edit the release to add release notes and publish it.
40+
Releases are handled by release-please. Merges to `main` create or update a release PR; merging that PR cuts the tag, updates `CHANGELOG.md`, and publishes the GitHub release (the workflow also attaches the packed UPM artifact).
4741

4842
### Contribute code to this project
4943

5044
Read [CONTRIBUTING.md](./CONTRIBUTING.md) for more information on how to contribute code to this project.
5145

5246
### Examples
5347

54-
Example(s) of the SDK are in the [Examples](https://github.com/asadm/playroom-unity/tree/main/Assets/PlayroomKit/Examples) folder
48+
Example(s) of the SDK are in the [Samples](https://github.com/playroomkit/unity/tree/main/Packages/com.playroomkit.sdk/Samples~) folder
5549

5650
<!-- End SDK Contribution -->
5751

5852
### Limitations
59-
Currently, there's no support for using the native platforms. We'd love to hear ideas and plans to implement PlayroomKit for Unity on native platforms. Please join [this Discord](https://discord.gg/uDHxeRYhRe) to discuss!
53+
Currently, there's no support for using the native platforms. We'd love to hear ideas and plans to implement PlayroomKit for Unity on native platforms. Please join [this Discord](https://discord.gg/uDHxeRYhRe) to discuss!

0 commit comments

Comments
 (0)