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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-27260