Use Texture2D.Reinitialize on Unity 2021.2 and newer.

This commit is contained in:
Juke
2026-09-09 16:54:44 +02:00
parent b2a005356d
commit 6598d8243b
@@ -122,7 +122,11 @@ namespace MA_Texture
}
#if UNITY_2021_2_OR_NEWER
texture.Reinitialize(newWidth, newHeight);
#else
texture.Resize(newWidth, newHeight);
#endif
texture.SetPixels(newColors);
texture.Apply();