Closed cake-pie closed 5 years ago
TIL there is a way to prevent Unity from screwing up my texture resolution. Thanks for letting me know!
Unfortunately, it doesn't work on the Sprite create button, as shown below.
I will accept your contribution first and try to resolve the remaining blurry issue.
try to resolve the remaining blurry issue.
There's actually another way which is to disable mipmapping in the GameDatabase, that is more involved. I'm actually about to create a new repo for a mod to do that and push some code.
Not sure if that approach would help your situation, but if you hold off on a bit on a release we can investigate further.
At a very brief glance I see you have some utility functions to create new Texture2D
s.
You need to use the version of the ctor that has mipmap
and make sure to turn that off. example
Note that if you are creating textures you need to be mindful to dispose them when no longer used. They apparently do not get GC'd.
I'll take a closer look at your code later, but for now you can give the above suggestion a shot.
Noted on the texture information.
I remember I found another way to make an image button with single texture some time after initial mod release, without the messy workaround of one "background" texture for each active, normal, highlight or disabled button state. I need to backtrace on how I arrive at this way.
Prevents mipmapping when GameDatabase loads the textures, which subsequently leads to blurry UI when graphics settings are not at full texture quality.
*.png @ quarter res![blur](https://user-images.githubusercontent.com/28502722/57182016-84250080-6e4f-11e9-8bb5-33c4bdd2a219.png)
*.truecolor @ quarter res![sharp](https://user-images.githubusercontent.com/28502722/57182020-8c7d3b80-6e4f-11e9-8b91-8f6a13da61c3.png)