Answer the question
In order to leave comments, you need to log in
How to know if an image in spriterenderer is blurry?
I have a th that contains a spriterenderer that had its scaling changed.
How do you know if an image is blurry from its original resolution?
I create through the inspector photos in the scene and make them height in world space the same size.
as a result, I can get that the photo was not of sufficient resolution and turned out to be blurry.
how to find out in runtime that it is blurry and add a frame to the image to return the image resolution and leave the canvas size alone?
Answer the question
In order to leave comments, you need to log in
and the answer is simple)
bool QualityCalculation()
{
float factor = this.GetComponent<SpriteRenderer>().bounds.size.y / this.sprite.bounds.size.y;
if (factor > 1f)
return true;
return false;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question