Strange Unity tilemap issue - unity3d

This issue is a little hard to explain, my first time creating a tilemap in Unity and when I ran the program to test out the camera position on the map, my tilemap converted into whatever this mess is. I don't exactly know what happened but I can't seem to revert it back to how it was, if anyone could help me they'd be a total lifesaver.

Did you check the camera size? If the image looks like a low res version of your tilemap than change the size to 1.

Related

My sprite cover the edges of other sprite Unity 2D

I'm working on a procedural world generation in Unity 2D. But when It spawns my blocks, blocks cover each other. What could be the possible problem? How can I fix it?
Thanks for your help.
Screenshot:
screenshot
It might be because you made the boxcollider2D on your blocks a little too small.
Try to fit the collider perfectly with the edges of the block
Okay, finally managed to solve it. For future people, here's the solution:
So when you export your sprite from Photoshop or whatever program you use, you export it with a preferred size (ex. 128×128 px).
What you need to do is, go ahead and click your .png file in Unity. In the inspector window, you will see an option called "Pixels Per Unit". You have to enter the correct sprite size there.
Apply the changes, and there you go!

Why do my lights keep flickering in my unity 2d game?

I placed 9 Point Lights within my 2D game on unity, however they keep flickering and not showing when I run the game and in editor, I don't know what's happening, I've tried changing the z value but that doesn't work.
Here is a video as I am horrendous at explaining things.
Lighting Issues Video
I'm relatively new to unity.
Assuming few Scenarios like you are using latest updated Shaders.
There are few possibilities I think you could give it a try.
Solution 1:
This could be because of Z Buffer problem usually caused due to camera clipping values.
Try Adjusting, by increasing the near clipping plane on your camera or decreasing it.
Solution 2:
Check if the Lights placed are not overlapping, sometimes the lights overlapping also may cause flickering,

How to import cloth simulation from Blender to Unity

The only way that I found to import the cloth animation from Blender to Unity for mobile is by exporting each frame as a separate mesh and then replacing it at runtime to create the animation. (if anyone knows other solution please tell me).
The problems is that the "meshToChange = otherMesh" way has a big hit on performance on mobile. I'm curious to see if there is a better way to change the mesh at runtime.
Thank you :)
There are a few ways to do this
1.The best way would be this:
Get the keyframes for the baked simulation with a .mdd addon for blender.
Import the Blender project in Unity.
Add the prefab in a scene.
Select you object and go to the Skinned Mesh Renderer component and expand the BlendShapes. There you will find all your data.
After that you will need a script to cycle through the BlendShapes. Here is a simple script that will do the job.
For better information check out this video.
Thanks to #derHugo for helping me with this one.
I am not going to focus on the next ones but I will put some references here for anyone interested.
2.Using Alembic files.
If I am correct this is the way the Unity team did it for the short film ADAM.
Check out this video.
To note that this will not work for mobile.
3.Cycling and changing the mesh every frame.
This technique is very similar to a 2D animation.
All you have to do is export a sequence of fbx's for the animation and then cycle through them. script
Be aware that you will get a huge performance hit from this.
With a cloth simulation with around 7k tris changing the mesh every few frames I was getting around 30fps with nothing else in the scene on an IPhone 6.

Experiencing a strange tile rendering bug in Unity's Scene view

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:

unity3d - Camera jittering?

For some reason when I run my game the camera which follows the player has a slight jitter to it. If I watch the transform the Y position values are fluxuating and the rotation is affected aswell. I can not think of any reason for this to be happening other than maybe having more than one camera as my water comes with a 'reflection camera'. I am using basic unity packages, and even when rewriting the camera follow script, the problem still occurs.
I know there is not much to go on here, as the code is minimal for this issue(using 3rd person controller and camera components). I hope someone has had this error in the past and fixed it or knows enough about unity to help me out here because im lost.
Much appreciated
EDIT
Dont know if animations could be effecting it but I thought id mention my model has animations
To resolve your problem. Click Assets->Import Package-> Characters Uncheck everything Execpt. SmoothFollow.
Drag Smooth Follow to your Camera. Drag your Character to the Target from Smooth Follow Script.
If this doesn't fix the issue. Try to remove your own script.