File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Source/ROUtils/ProceduralTools Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ public class DragCubeTool : MonoBehaviour
38
38
39
39
public Part Part { get ; private set ; }
40
40
41
+ /// <summary>
42
+ /// Invoked once all drag cubes have been generated and assigned to the part.
43
+ /// </summary>
44
+ public event EventHandler AllCubesAssigned ;
45
+
41
46
/// <summary>
42
47
/// Creates and assigns a drag cube for the given procedural part.
43
48
/// This process can have one to many frames of delay.
@@ -119,6 +124,7 @@ private void UpdateCubes()
119
124
else
120
125
{
121
126
UpdateCubes ( Part , _shapeKey , _updateSymCounterparts ) ;
127
+ AllCubesAssigned ? . Invoke ( this , EventArgs . Empty ) ;
122
128
Destroy ( this ) ;
123
129
}
124
130
}
@@ -171,6 +177,7 @@ private bool TryUpdateMultiCubesFromCache()
171
177
172
178
NotifyFARIfNeeded ( Part ) ;
173
179
EnsureStatsRoutineStarted ( Part ) ;
180
+ AllCubesAssigned ? . Invoke ( this , EventArgs . Empty ) ;
174
181
175
182
Destroy ( this ) ;
176
183
}
@@ -261,6 +268,7 @@ private IEnumerator UpdateMultiCubesRoutine(bool isValidation = false)
261
268
262
269
NotifyFARIfNeeded ( Part ) ;
263
270
EnsureStatsRoutineStarted ( Part ) ;
271
+ AllCubesAssigned ? . Invoke ( this , EventArgs . Empty ) ;
264
272
265
273
Destroy ( this ) ;
266
274
}
You can’t perform that action at this time.
0 commit comments