Conversation
There was a problem hiding this comment.
Pull request overview
Updates documentation and example code to improve tutorial correctness/clarity for UniState users.
Changes:
- README: fixes typos/grammar, refines tutorial wording, and updates several code snippets.
- README + Examples: adjusts dice roll range to match a 6-sided die (1–6) and fixes a log message grammar issue.
- README: fixes a state machine constructor snippet bug (
_logicMachineassignment) and improves naming consistency in popup example methods.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Documentation/tutorial edits and snippet corrections across getting started + tutorials |
| Assets/Examples/States/RollDiceState.cs | Changes dice roll range to 1–6 (Unity Random.Range int max-exclusive) |
| Assets/Examples/States/LostState.cs | Fixes grammar in log message |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| //Popup prefab (Monobehaviour, view) | ||
| public class SimplePopupView : ISimplePopupView, Monobehaviour | ||
| // Popup prefab (MonoBehaviour, view) | ||
| public class SimplePopupView : ISimplePopupView, MonoBehaviour |
There was a problem hiding this comment.
In C#, the base class must be listed before interfaces. MonoBehaviour is a class, so this declaration won’t compile as written; swap the order to inherit from MonoBehaviour first and then implement ISimplePopupView.
| public class SimplePopupView : ISimplePopupView, MonoBehaviour | |
| public class SimplePopupView : MonoBehaviour, ISimplePopupView |
| It is a good practice to specify target version, UniState uses the `*.*.*` release tag so you can specify a version | ||
| like `#1.8.0`. For example `https://github.com/bazyleu/UniState.git?path=Assets/UniState#1.8.0`. | ||
| like `#1.9.0`. For example `https://github.com/bazyleu/UniState.git?path=Assets/UniState#1.9.0`. | ||
| You can find latest version number [here](https://github.com/bazyleu/UniState/releases). |
There was a problem hiding this comment.
The README now uses #1.9.0 as the example tag, but the package version in Assets/UniState/package.json is still 1.8.0. Unless a 1.9.0 release/tag exists, this example will mislead users; consider keeping the example version in sync with the current package/release.
|
|
||
| You can add `"com.bazyleu.unistate": "https://github.com/bazyleu/UniState.git?path=Assets/UniState"` (or with version | ||
| tag `https://github.com/bazyleu/UniState.git?path=Assets/UniState#1.8.0`) to `Packages/manifest.json`. | ||
| tag `https://github.com/bazyleu/UniState.git?path=Assets/UniState#1.9.0`) to `Packages/manifest.json`. |
There was a problem hiding this comment.
Same version example issue as above: the manifest.json snippet references #1.9.0, which should match an actual released tag (and ideally the package.json version) to avoid users pinning to a non-existent/incorrect version.
| tag `https://github.com/bazyleu/UniState.git?path=Assets/UniState#1.9.0`) to `Packages/manifest.json`. | |
| tag `https://github.com/bazyleu/UniState.git?path=Assets/UniState#<version>`) to `Packages/manifest.json`. |
No description provided.