Search Issue Tracker
Won't Fix
Votes
0
Found in
2020.1
2020.1.4f1
2020.2
Issue ID
1276688
Regression
No
'MainTex' property of a custom material is not updated when selecting a different texture in the Inspector window
How to reproduce:
1. Open the user's attached project
2. Open the 'Maze' Scene
3. In the Hierarchy window select the 'Wrong' object
4. In the Inspector window expand the 'Wall (Material)' component
5. Press 'Select' on the right of the 'MainTex' property
6. In the 'Select texture' window double-click on 'None'
7. Open the 'Select texture' window again
Expected result: The 'MainTex' property gets updated to 'None'
Actual result: The 'MainTex' property doesn't get updated and remains set to 'All'
Reproducible with: 2020.1.6f1, 2020.2.0b2
Cannot test with: 2018.4.27f1, 2019.4.11f1 (due to errors)
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 DynamicHeapAllocator::CreateTLSFBlock when opening a specific project
- Scene flickers when using Mesh Output with SpriteLit Shader in 2D project
- “Cache Management” text is misaligned in Preferences > Package Manager
- [macOS] network permission shows the name of previously closed app when different app requests network access
- Delta value returned by mouse movementsMonitor is different when changing Screen Resolution
Resolution Note:
The _MainTex property of a material used by a SpriteRenderer is overridden by the renderer and will always point to the Sprite texture, regardless of what texture you assign to the material asset. In fact, it you create a material from the default sprite shader, you will find that the _MainTex field is disabled in the Inspector. However, shaders created using Shader Graph don't support this behavior, so you are still able to freely assign any texture. However, for the reason mentioned above, you should not do that.