You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We get a "Co-variant array conversion from Transform[] to Object[] can cause run-time exception on write operation" warning when using eg Undo.RecordObjects(transforms, "Edit Transforms"); (passing a Transform[] when the method signature only takes Object[]).
I understand why this happens, but in this case it's unwarranted because the array we pass will only be read, not written to. I'm sure there are more such examples in the Unity API.
Is there a mechanism in Resharper to white-list methods for warnings? external annotations?
If so, is there such a Unity-specific whitelist we can edit somewhere / send a PR?
The text was updated successfully, but these errors were encountered:
We get a "Co-variant array conversion from Transform[] to Object[] can cause run-time exception on write operation" warning when using eg
Undo.RecordObjects(transforms, "Edit Transforms");
(passing aTransform[]
when the method signature only takesObject[]
).I understand why this happens, but in this case it's unwarranted because the array we pass will only be read, not written to. I'm sure there are more such examples in the Unity API.
The text was updated successfully, but these errors were encountered: