Skip to content

Commit 8047529

Browse files
committed
Update SimulatedHandDataProvider.cs
1 parent e07a432 commit 8047529

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,16 @@ public bool UpdateHandData(SimulatedHandData handDataLeft, SimulatedHandData han
189189
// https://stackoverflow.com/questions/2143140/c-sharp-datetime-now-precision
190190
long timestamp = DateTime.UtcNow.Ticks;
191191

192-
// Cache the generator delegates so we don't cg alloc every frame
192+
// Cache the generator delegates so we don't gc alloc every frame
193193
if (generatorLeft == null)
194+
{
194195
generatorLeft = HandStateLeft.FillCurrentFrame;
196+
}
195197

196198
if (generatorRight == null)
199+
{
197200
generatorRight = HandStateRight.FillCurrentFrame;
201+
}
198202

199203
handDataChanged |= handDataLeft.UpdateWithTimestamp(timestamp, HandStateLeft.IsTracked, HandStateLeft.IsPinching, generatorLeft);
200204
handDataChanged |= handDataRight.UpdateWithTimestamp(timestamp, HandStateRight.IsTracked, HandStateRight.IsPinching, generatorRight);

0 commit comments

Comments
 (0)