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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a1