I have UI.Image in my scene. When I reference Source Image to Sprite asset, I have full resolution quality and it does not depend on QualitySettings > Texture Quality. But I need to replace this UI.Image to external png:
var texture = new Texture2D( 2, 2 );
texture.LoadImage( File.ReadAllBytes( path ) );
var rect = new Rect( 0, 0, texture.width, texture.height );
var pivot = _image.sprite.pivot;
_image.sprite = Sprite.Create( texture, rect, pivot );
After replacing in this way I’m getting UI.Image with sprite that depends on QualitySettings > Texture Quality. Can I create Sprite or Texture2D in some way that does not depend on this setting?