Closed loosegrid closed 3 years ago
Hi @Appleguysnake, So if I understand correctly you are reporting that after editing the file, the reported issues are no longer marked as "critical". Is that correct?
Apparently not! I just tried to reproduce it and it seems the errors are always marked critical, I think the little icon just didn't pop up right away the first time I tested it.
@Appleguysnake, Is it safe to close this issue then?
No, being marked as critical was just an extra detail. The bug is that floats are not arrays so it shouldn't be flagging them as array allocations.
Indeed they are all float but they are all packed together into an array. It's using Mathf.Min method with params keyword.
public static float Min(params float[] values)
It's an implicit array allocation.
Ahhh okay I see now, thanks for explaining it. Perhaps there's a way to clarify the message in that case?
The following code gives a critical array allocation warning for each line:
Moving the
0.5f
into a variable continues to give an error. Moving the variable outside the loop and changing it to a class constant still generates the errors, which are once again marked critical.