Weird Game Screen

I am seein some strange blue line in my game window.

Game screen:-

Game screen in fullscreen:-

What could be the reason as it seems okay in scene window??

Hi,

Those random lines are a typical problem when working with sprites. The reason for this is that there are only full pixels on our screen. However, when we move our player, the sprites move too. Since we want a smooth movement, there could be situations where the shader picks pixel data outside the bounding box of the sprite, which is normal. However, since there was “nothing”, we see the background.

If the creator of the tile sprites took this into consideration, they included a 1px “border” to each of their sprites. Go to the Texture Import Settings, then click on Edit Sprite and make all sprites 2px smaller on the x- and y-axis. Then click on “Apply”. Theoretically, that should solve the problem.

If the sprites look weird in your game, the creator of those sprites did not take the shader into consideration. In that case, you could try to decrease the Pixels Per Unit value by 1.

Did this help you fix the issue?


See also:

I am using same assets as that of lecture.
But yes, reducing the pixel by 1 is solving the problem.

Rick encounters the same problem as you with the course sprites. In one of the lectures, he sets the Pixels Per Unit value to 31.

Earlier I tried to change the filter mode to point no filter, it solved the problem partialy but in fullscreen there was problem.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms