Merge pull request #14 from yany79/guard-texture-reinitialize-for-older-unity

Use Texture2D.Reinitialize on Unity 2021.2 and newer.
This commit is contained in:
max
2026-09-14 11:36:31 +02:00
committed by GitHub
@@ -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();