mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 00:07:52 +08:00
3.1.5
* Integrate PR from js6pak
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user