Commit c9557b4 1 parent 9e48b83 commit c9557b4 Copy full SHA for c9557b4
File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ private void onTransitionOut() {
61
61
// wipe the spinner connections so that they are computed again after the transition (in the new room).
62
62
spinnerNeighbors = null ;
63
63
listOfSpinners = null ;
64
+ shatteredSpinners . Clear ( ) ;
65
+
66
+ // stop the running computation of spinner connections (if any)
67
+ computeSpinnerNeighborsToken ? . Cancel ( ) ;
68
+ computeSpinnerNeighbors = null ;
69
+ computeSpinnerNeighborsToken = null ;
64
70
}
65
71
66
72
public override void Awake ( Scene scene ) {
@@ -110,11 +116,11 @@ public override void Update() {
110
116
111
117
public override void Removed ( Scene scene ) {
112
118
base . Removed ( scene ) ;
113
- computeSpinnerNeighborsToken . Cancel ( ) ;
119
+ computeSpinnerNeighborsToken ? . Cancel ( ) ;
114
120
}
115
121
public override void SceneEnd ( Scene scene ) {
116
122
base . SceneEnd ( scene ) ;
117
- computeSpinnerNeighborsToken . Cancel ( ) ;
123
+ computeSpinnerNeighborsToken ? . Cancel ( ) ;
118
124
}
119
125
120
126
private Task computeSpinnerConnections ( CancellationToken cancelToken ) {
You can’t perform that action at this time.
0 commit comments