mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2026-10-22 19:45:53 +02:00
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:
1 file changed
+4
@@ -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