I’ve been working with unity lately and I’m not sure what I’m missing but for some reason in the game view my 2d Images become blurry / pixelated.
I’ve already tried all the filter modes, resize algorithms, compression types,
texture quality in project settings, changing anti aliasing and turning it off and my quality is on ultra
the whole scene is just these sprites, no scale applied or anything and my game view scale is set to as low as it goes
Check compression settings on your sprite? Maybe even the build.
Could be compression as @witylernn mentioned. You may also want to check the camera orthographic size in the player. You will either need to select one that is pixel-perfect for you sprite, or try using the pixel-perfect camera package.
I might also ask if the sprite itself is large? From the picture, it appears to be resized in the player. Is the scale (1,1,1)?
The version I use is below (may or may not help):
using UnityEngine;
// ReSharper disable once CheckNamespace
public class PixelPerfectCamera : MonoBehaviour
{
public int ppuScale = 2;
public int pixelsPerUnit = 32;
public bool killCamScript = true;
// Use this for initialization
void Start()
{
//Resize the camera for PP viewing (use the old method in the editor b/c Unity doesn't seem to want to switch screen res in editor)
#if UNITY_EDITOR
ResizeByCameraOrthoSize();
#else
ResizeByCameraOrthoSize(); //ResizeByCameraResolution(); -- New method is odd
#endif
//Done, kill it
if (killCamScript)
DestroyImmediate(this);
}
void ResizeByCameraOrthoSize()
{
//Old method - will not have the benefit of a lower screen resolution
double orthoSize = 1.0 / (2f / Screen.height * pixelsPerUnit);
orthoSize = orthoSize / ppuScale;
// ReSharper disable once PossibleNullReferenceException
Camera.main.orthographicSize = (float)orthoSize;
}
void ResizeByCameraResolution()
{
//New method - instead of resizing the camera orthographic size, the screen resolution is modified
double orthoSize = 1.0 / (2f / Screen.height * pixelsPerUnit);
int newScreenHeight = (int)(2f * pixelsPerUnit * orthoSize);
float ratio = Screen.width / Screen.height;
int newScreenWidth = (int)(newScreenHeight * ratio);
// Debugging
//ConsoleController.Console.Add(string.Format("Current screen res: {0}x{1}", Screen.width, Screen.height));
//ConsoleController.Console.Add(string.Format("Current ratio: {0}, orthographic size: {1}", ratio, Camera.main.orthographicSize));
//ConsoleController.Console.Add(string.Format("Calculated screen res: {0}x{1}", newScreenWidth, newScreenHeight));
Screen.SetResolution(newScreenWidth, newScreenHeight, true);
//ConsoleController.Console.Add(string.Format("New screen res: {0}x{1}", Screen.width, Screen.height));
//ConsoleController.Console.Add(string.Format("New ratio: {0}, orthographic size: {1}", (float)Screen.width/Screen.height, Camera.main.orthographicSize));
}
}