Search Issue Tracker

Active

Votes

1

Found in [Package]

2.6.2 - Collections

Issue ID

ECSB-1793

Regression

No

Collection structs are missing readonly modifiers on methods, causing unnecessary defensive copy creation

Package: Unity Native Collections

-

How to reproduce:

  1. Open the “GraphicsTesting.zip“ project
  2. Open the “UnityStructsMissingReadonlyModifier.cs“ script in JetBrains Rider IDE
  3. Observe the warnings on all of the methods

Expected result: No warnings about impure methods
Actual result: Impure method warnings are thrown

Reproducible in: 1.1.0, 2.6.2 (6000.0.60f1, 6000.2.8f1, 6000.3.0b7, 6000.4.0a3)

Reproduced on: Windows 11 Pro (24H2)
Not reproduced on: No other environment tested

Note: The warnings are not observable in Visual Studio 2022 or likely any other IDE

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.