Quick Start
Importing the Package
Open the Unity Package Manager (Window > Package Manager).
Import the Observed package.
Adding the using Statement
In the scripts where you want to use the Observed
classes, add the following using statement:
Creating an Observable
Initialize the observable in the Start
method:
Subscribe to the observable
Set the value of the observable:
Now every time the player presses the space bar, the score will be incremented and the UpdateScoreText
method will be called, updating the score text on the screen.
Last updated