Search Issue Tracker
Fixed in 2022.2.X
Votes
0
Found in
2020.3
2021.1
2021.2
2022.1
2022.1.0a10
Issue ID
1372143
Regression
No
"'_MainTex': Dimensions must match" error if assigning 2D texture to 2D Array texture property
How to reproduce:
1. Open project "My project (5).zip"
2. Create a Custom Render Texture (Assets>Create>Custom Render Texture)
3. Select newly created Custom Render Texture
4. In the Inspector menu change Dimension to "2D Array"
5. Press CTRL + Z or command + Z
6. Look at the Console window
7. Again create a Custom Render Texture (Assets>Create>Custom Render Texture)
8. Click in a Project window to deselect a Texture
9. Look at the Console window
Expected result: No warnings or errors appear
Actual result: "Metal: Shader[Hidden/Preview Color2D]: Incompatible texture type [MTLTextureType2DArray] of texture [New Custom Render Texture 6] bound at index 0, expected [MTLTextureType2D]" warnings appear after the 5th step and "Error assigning 2D texture to 2DArray texture property '_MainTex': Dimensions must match UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)" error appears after the 8th step
Reproducible with: 2020.3.20f1, 2021.1.25f1, 2021.2.0b16, 2022.1.0a12
Could not test with: 2019.4.31f1 (No 2D Array option)
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
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
- The options modal for which type of Tilemap to create isn't drawn when it has been previously closed until the user moves their cursor
- There are 2 Overlay Menus present in the Tile Palette Window
- Unable to change the Shadow Map resolution for lights via Inspector when 'preserveCachedShadow' is enabled
- Adaptive Probe Volumes are not loaded when Adaptive Light Probes are exported via Asset Bundles and opened on another project
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a1