Search Issue Tracker
Fixed in 2022.2.X
"'_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)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [VFX/Timeline] Wrap Mode Loop is only playing VFX once
- Package Manager doesn't start on Windows 7
- Toggling "Optimize Mesh Data" in Project Settings doesn't invalidate build pipeline cache for Addressables
- [HDRP] [DXR] Shadowmatte doesn't support RT shadows
- [HDRP] TAAU@100% and TAA produces different results