Search Issue Tracker
Fixed in 2018.2.X
Votes
0
Found in
5.6.4p2
Issue ID
973893
Regression
No
[UI] GetMaterial function of the CanvasRenderer class always returns material at index 0
Steps to reproduce:
1. Open attached “GetMaterial.zip” Unity project
2. Open “Main” scene
3. Select "Text" object (child of Canvas) in Hierarchy
4. Enter Play mode
5. Observe Material Temp value in the attached script component in Inspector
Expected results:
GetComponent<CanvasRenderer>().GetMaterial(1); returns the material at index 1 and Material Temp value is ‘Mat2'
Actual results:
GetComponent<CanvasRenderer>().GetMaterial(1); returns the material at index 0 and Material Temp value is ‘Mat1'
Reproduced in: 2018.1.0a7, 2017.3.0f1, 2017.2.0p4, 2017.1.2p3, 5.6.4p3, 5.5.5p1, 5.5.0a6, 5.4.6f3
Fixed in: 2018.2.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Add comment