Search Issue Tracker
Fixed
Votes
0
Found in
2022.2.16f1
2023.1.0b12
2023.2.0a11
Issue ID
UUM-33045
Regression
No
List.Capacity is used instead of count in ”SetSharedMaterials”
How to reproduce:
1. Open the user’s attached “SetSharedMaterialsBug.zip” project
2. Open the “MaterialBug.cs” file (Assets > MaterialBug) and comment out line 22 and uncomment line 25
3. In the Hierarchy window, select “Cube” GameObject
4. Enter Play Mode
5. Observe the Materials of the “Mesh Renderer” Component in the Inspector window
Expected result: There is one material “SwapTo”
Actual result: There is one material “SwapTo” and three 3 “None (Material)”
Reproducible with: 2022.2.16f1, 2023.1.0b12, 2023.2.0a11
Could not test with: 2020.3.47f1, 2021.3.23f1 ('MeshRenderer' does not contain a definition for 'SetSharedMaterials’)
Reproduced on: macOS 13.2.1 (Intel)
Note: Not reproducible with “sharedMaterials”
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
- Crash on ConvertBufferToEXRBuffer when Lighting Generation is cancelled
- [URP] TrailEffect in URP package samples does not draw Trail Effect
- "NullReferenceException" error is thrown when calling UIDocument.runtimePanel in OnEnable with ExecuteInEditMode
- Graphics.Blit() performs the operation only to the last display when a multi-display environment is used
- [Windows] Multiple Separation Lines are present in the Light Create Menu
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-27260