This repository was archived by the owner on May 9, 2025. It is now read-only.
This repository was archived by the owner on May 9, 2025. It is now read-only.
Setting value for FloatVariable is causing GC allocations and slower execution #154
Open
Description
In one of my MonoBehaviours, I am updating a FloatVariable
every Update
.
However, I am noticing that this is causing the Update
for the function to be much slower than if I had just set a float.
With the line
myFloatVariable.Value = myFloat
, the Update function takes 0.54ms to complete and has a bunch of GC allocations:
Setting only the float itself is significantly less time:
Anyone know why this might be the case?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels