Search Issue Tracker
Fixed
Fixed in 1.3.X - Entities
Votes
0
Found in [Package]
1.2.0 - Entities
1.3.X - Entities
Issue ID
ECSB-1060
Regression
Yes
"SystemAPI.GetSingletonBuffer" method's "isReadOnly" argument is ignored when generating ISystem code
How to reproduce:
1. Open the “BugReports“ project
2. In the Project window navigate and open the “Assets/SignletonBufferSystem.cs” script
3. Wait until IDE indexes all the files
4. Select the class name string “SingletonBufferSystem”
5. Right-click on it then from the context menu select “Go to declaration” or press F12
6. Observe lines 12 and 14
Expected result: The “GetSingletonBuffer” method arguments are not empty
Actual result: The “GetSingletonBuffer” method arguments are empty
Reproduced with: 1.2.0-exp.3 (6000.0.0b15), 1.2.0 (2022.3.25f1, 6000.0.0b15)
Not reproduced with: 1.0.16 (2022.3.25f1), 1.1.0-pre.3 (6000.0.0b15)
Reproduced on: Windows 11
Not reproduced on: No other environment tested
IDE reproduced on: JetBrains Rider
IDE could not test on: Visual Studio (Could not find a way to inspect the generated code)
Workaround: Use “SystemAPI.TryGetSingletonBuffer<SingletonBuffer>(out var buffer, true)” instead of “SystemAPI.GetSingletonBuffer<SingletonBuffer>(true)”
Note: More explanation on the expected and actual results is provided in the internal comments
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
- Hovering on the three-dot menu also highlights the tab header near it when not all tabs fit the bar
Resolution Note (fix version 1.3.X - Entities):
SystemAPI.GetSingletonBuffer now correctly passed the IsReadOnly param