Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.12f1
2022.1.23f1
2022.2.0b15
2023.1.0a19
2023.2.0a1
Issue ID
UUM-20075
Regression
No
Material.HasTexture/HasProperty returns true for non-existent property after calling setTexture
How to reproduce:
1. Open the user-attached project “ShaderPropertyBug”
2. Enter the Play Mode
3. Observe the Console
Expected result: There is no error message because Material.GetTexture shouldn’t be called since Material.HasTexture is false
Actual result: There is an error message because Material.GetTexture is called
Reproduced with: 2021.3.12f1, 2022.1.23f1, 2022.2.0b15, 2023.1.0a19
Couldn’t test with: 2020.3.41f1 (Material.HasTexture can’t be called)
Reproduced on: Windows 11 Pro
Note: Also reproduced in Player
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
- Popup windows spawn on the incorrect monitor when the Editor is placed near the boundary of scaled monitor next to a monitor with different scaling
- Hidden Tabs do not shift into empty space after closing visible Tabs
- [Android] Application not deployed on a device when "activity-alias" is used in the AndroidManifest
- Shader compile process adds shader ID to the constant buffer name when the word "Globals" is being used in Vulkan
- Audio Mixer Snapshot link to the documentation isn’t working
Resolution Note:
After discussing with the team, we decided to postpone any significant behavior change to the existing interface. As mentionned by Juho Oravainen , material setters/getters should work independently from the shader assigned. We should then have a different set of functions to check if the shader assigned to the material has properties and what is set to it.
Right now the documentation is describing the current state of things. Set is setting both, material and shader. Has is looking at the shader and get is getting from the shader except for textures which get it from the material. I tried to change the existing behavior of the texture getter but I ran into failing tests on the graphic side which hint me that it might be a more important breaking change than I thought in first place.
We are looking forward to refactor this in a version post 2023.x.