Some glitches (random lines) appear in my pixel art game which I cannot get rid of.
In the zoomed photo you can see it more clearly.
I checked, anti-aliasing was disabled, I don't know what else to do.
And it seems fine in Scene view, the glitch is only in the Game view.
Here are the settings of the assets.
While developping a 2d game we've encountered a similar problem. This video explains well what's happening and some solutions to fix the problem. Hope it can help you !
Related
We're making VR Scenes in Unity 2019.4.17f1 HDRP and in one of our scenes all our real-time spot lights seem to disappear when looking at certain directions.
Here's a video to show the issue:
https://www.youtube.com/watch?v=2LiDWQW_ui4
I tried my best to search for a solution but I don't know how to fix it.
The number of lights and shadows that are allowed to be on screen are already very high.
All of the spot lights are set to important
there are no flare components on any light or camera.
In every other scene there seems to be no problem with similar lights
The settings are almost identical in every scene so there shouldn't be an issue.
If anyone has any solutions or can suggest things I could try to fix the issue, it would be a great help :)
This issue only affects the Scene view, and it is not present in the Game view or when it is running.
Basically my map looks like this.
https://i.imgur.com/BBrKA5f.png
Zoomed Out
https://i.imgur.com/G8BuG8d.png
As you can see there are horizontal lines everywhere. The grid is turned off. They are mostly blue because underneath the grass tile on the sheet is the water tile. You can see under the left of the rock there is a yellowish line, this is because there is a sandy tile below it. The individual images from the Sprite editor look fine. No lines in them. As mentioned, this is only present in the scene view and doesn't affect the game so its not major. I would really like to see if this is possible to fix though as it is quite a pain to look at and design maps with. This issue is present on my PC, and both laptops so I don't think it's hardware related.
Tile palette images:
https://i.imgur.com/huNDlHy.png
https://i.imgur.com/uLwUpUM.png
I've tried adding them to an Atlas, checked for Point (no filter) and no compression. I'm at a loss. No one seems to know how to fix the issue and all my googling points me to bleed or tears in the actual game which is not the issue I am having.
Any help would be greatly appreciated and I will provide any additional information that is needed.
Thank you.
So after a few days of frustration and help from the Unity discord, I finally found an answer.
It turns out you want to disable Pixel Snap in your Shader component on your tilemap object. As soon as I did that all the lines in Scene View were gone.
Setting to change:
I'm having a serious issue with Unity. It's most definitely a conceptual issue, and I would love some help understanding what I'm doing wrong.
The game window on the Unity editor shows my game working exactly as intended. The sizing of everything is perfect, the animations fit nicely, and everything is how I want it to be.
The problem, however, is that when I actually build the game, nothing is where it should be. The animations are off. The sizing of buttons and canvas UI elements are wonky. This is not what I see represented in the Unity editor, so I have no idea why it's working like that.
I've tried changing canvas to scale with screen size because the canvas elements are what is bugging.
I expect my built game to look exactly as it does in the unity editor, but that's not happening.
Thanks!
When I use One Camera to show the scene and put to a TargetTexture,another camera to show the RenderTexture and ui,but I find that the gizmo I use to debug not show.
perhaps the image is misleading, but I have the exact same problem so I'll explain how I understand OP's question:
OP draws a gizmo (not talking about the camera gizmo, but using Gizmo.Drawx in the OnDrawGizmo method) to help him visualize some stuff.
But when he uses a second camera, the gizmo is no longer drawn in the game view (still in the scene view, as you can see on the picture).
I have the same issue with a different setup though, so I'd love to know if OP has found an answer to his problem.
I'm having an issue with 3d objects doing some kind of weird z fighting or climbing on top of each other depending on where the camera is moved to. I have posted some pictures to help illustrate the problem. Each rectangular "building" contains textured cubes of all the same size. The corner cubes do overlap somewhat. As you can see from the picture, every object is the same height. This is seen in the scene editor as well as the final rendered product. Can anyone explain what is causing this and how it can it possibly be fixed? Thank you :)
So the problem was the texture using transparency shader. After googling there seemed to be all kinds of issues with the unity transparency shader that involve workarounds. Two solutions to this is to either turn off transparency, or put the camera in orthographic mode.