mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2026-09-16 19:55:44 +02:00
Use Texture2D.Reinitialize on Unity 2021.2 and newer.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user