Add Cysharp/R3 reactive extensions package and demonstrate ReactiveProperty usage #5
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.
This PR integrates Cysharp/R3, a modern reactive extensions library, into the Unity project template and demonstrates its usage with a practical example.
Changes Made
Package Integration
Added R3 to the Unity Package Manager via Git URL in
manifest.json
:The package is compatible with Unity 6.x (requires Unity 2021.3+) and follows the recommended UPM installation method for R3's Unity-specific package.
Code Demonstration
Enhanced
Scene01_Intro.cs
to showcase ReactiveProperty functionality:Before:
After:
Reactive Behavior
The implementation demonstrates core R3 concepts:
When players jump and score points, the console will now log:
[R3 Demo] Score changed to: {newScore}
, providing a clear demonstration of reactive programming in action.Benefits
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/Cysharp/R3/contents
curl -s REDACTED
(http block)https://api.github.com/repos/Cysharp/R3/contents/src/R3.Unity/Assets/R3.Unity/Runtime
curl -s REDACTED
(http block)If you need me to access, download, or install something from one of these locations, you can either:
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.