* Integrate PR from js6pak
This commit is contained in:
sinaioutlander
2021-01-03 19:27:02 +11:00
parent 8c34aa2be5
commit 0432c6d56c
4 changed files with 18 additions and 12 deletions

View File

@ -71,7 +71,11 @@ namespace UnityExplorer.Helpers
pixels = orig.GetPixels((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
// use full constructor for better compatibility
#if CPP
var _newTex = new Texture2D((int)rect.width, (int)rect.height, TextureFormat.RGBA32, Texture.GenerateAllMips, false, IntPtr.Zero);
#else
var _newTex = new Texture2D((int)rect.width, (int)rect.height);
#endif
_newTex.SetPixels(pixels);
return _newTex;