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.
- Applied velocity is inconsistent when using Rigidbody AddForce() with ForceMode.VelocityChange
- Crash on AudioUtil_CUSTOM_HasAudioCallback when exiting Play Mode while the Inspector is displaying a GameObject with an empty script attached
- Scroll offset is framerate-dependent when scrolling with velocity in the Device Simulator
- "Object.FindObjectsOfType<T>() is obsolete" warning is thrown when using "Transitions Plus" asset
- [Mono] Crash on SystemNative_ReadDirR() when building for IOS/Android on a macOS machine