Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.32f1c1
2021.2
2022.1
2022.2
Issue ID
1413899
Regression
No
A GameObject cannot be selected in the Scene view when the Material contains a '_MainTex' property
Reproduction steps:
1. Open the user's attached project "selection_bug.zip"
2. Try to select "test_main_tex" and "test_base_map" in the Scene view
Expected result: Both GameObjects can be selected
Actual result: "test_base_map" can be selected, "test_main_tex" cannot
Reproducible with: 2019.4.37f1, 2020.3.32f1, 2021.2.18f1, 2022.1.0b14, 2022.2.0a9
-
sheppardchambers3851839
Mar 30, 2022 06:55
Thanks!
-
weent18
Mar 28, 2022 15:52
Simply just needed to state Now i am happy that i stumbled onto your page
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
- [iOS] Touch input is not clocked and UI is unresponsive when the application is paused mid-drag without lifting the finger
- [sw-unity-6-1] Scene view renders any light differently when more than one camera exists and neither have the "MainCamera" tag
- Project tab navigates to the previous folder when undoing (CTRL+Z) GameObject placement in the Scene
- Blue lines appear on the sides of the "Fit Canvas" or "Fit viewport" button when it's clicked in the UI Builder.
- PlayableDirector's state remains set to Playing even when the timeline's time property exceeds its duration.
Resolution Note:
The default selection logic will choose between OpaqueSelection.shader and AlphaBasedSelection.shader based upon the presence of a "_MainTex" uniform. If _MainTex is defined, it will use AlphaBasedSelection.shader which will do a clip based upon the alpha in the texture. The set texture, "sand_rock_cm.png" has 0 for alpha so this will always be a discard.
To fix this the user must add a custom picking pass to their shader. Attached is a modified version of their shader that works. Note: the render states needed to be moved inside the first pass as they caused picking to not work.