mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-24 11:35:24 -05:00
Merge pull request #1844 from mkc1370/feature/resize_to_reinitialize
Rename Texture2D.Resize to Reinitialize
This commit is contained in:
@@ -294,7 +294,11 @@ namespace VRM
|
||||
|
||||
BilinearScale(0, newHeight);
|
||||
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
tex.Reinitialize(newWidth, newHeight);
|
||||
#else
|
||||
tex.Resize(newWidth, newHeight);
|
||||
#endif
|
||||
tex.SetPixels(newColors);
|
||||
tex.Apply();
|
||||
}
|
||||
|
||||
@@ -190,7 +190,11 @@ namespace UniVRM10
|
||||
|
||||
BilinearScale(0, newHeight);
|
||||
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
tex.Reinitialize(newWidth, newHeight);
|
||||
#else
|
||||
tex.Resize(newWidth, newHeight);
|
||||
#endif
|
||||
tex.SetPixels(newColors);
|
||||
tex.Apply();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user