How do I intentionally pixellate a sprite in script?

As per topic, how can I pixelate a sprite in script? The effect I’m trying to achieve is to ‘fade in’ a sprite from pixelated to it’s final sharp version, and vice versa.

An example below:

You can convert your Sprite into a Texture2D , when you call .Apply() Unity will internal generate your mipmaps after which you can get your pixelated versions using Texture2D.GetPixels and you can go back to a Sprite , it’s a bit hacky.

Version 2: Use post effects , you can use RenderToTex and and a posteffect script to pixelate your image.

You’re talking about a ‘de-res’ ie de-resolution effect. You can pull this off by using a rendertexture. Render the sprite at a very small size to the render texture, then create custom geometry to ouput the sprite at its normal size but using only the portion of the render texture that you drew. Each frame you draw the sprite a bit bigger. It will gradually de-res into its full resolution. You can also do this with a shader.

Thanks for the ideas! Will try it out and see how it goes