Skip to content

Commit e762f71

Browse files
Merge pull request #359 from nezix/patch-1
Update networkedvar.md
2 parents 1e3dd16 + dc9176c commit e762f71

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/_docs/the-basics/networkedvar.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ void MyUpdate()
4444
{
4545
myFloat.Value += 30;
4646
}
47+
48+
void ListenChanges()
49+
{
50+
myFloat.OnValueChanged += valueChanged;
51+
}
52+
53+
void valueChanged(float prevF, float newF){
54+
Debug.Log("myFloat went from " + prevF + " to " + newF);
55+
}
56+
4757
```
4858

4959
### Single Sync Values

0 commit comments

Comments
 (0)