New answers tagged

0

I found the issue! I was looking into the error messages and found a similar post on the unity forums. --https://forum.unity.com/threads/visual-studio-tools-tab-dont-show-and-cant-attach-to-unity.365416/ One of the people said that there are issues if you have multiple versions of unity or multiple versions of visual studios. I found a few things about ...


0

The setScale function overwrites the previous scale. You just need to set the scale to 1 to get the original sprite. void Doodle::moveLeft() { d_Sprite.setScale(-1.0f, 1.0f); } void Doodle::moveRight() { d_Sprite.setScale(1.0f, 1.0f); }


1

It's spelled Rigidbody2D, not RigidBody2D. Capitalization matters in C#.


2

Edit: To remove the border around the sprite turns out there is an option in the Import Menu for the asset. In this menu change the Repeat Flag Setting to Disabled. Make sure to Reimport the asset after setting this the lines are no longer displayed around the image. (Import menu Viewable by selecting the image file and then checking the import tab, ...


1

The problem was caused by manual replacing of .png picture in project's folder. At first time I didn't found a valid way to import an image as sprite, so I created a default one in Unity, which creates a sprite and a picture 1x1 pixels. Then I replaced it with my own picture, but metadata didn't change, and the Unity still worked with sprite like it is still ...


1

I solved this problem by not using the LWRP Lit sprite shader. I created my own in Shader Graph that samples _MainTex and that fixes the sorting problem. The main cause was that the LWRP sprite shader made them automatically two-sided, while the old system they were one sided and that was causing my problem.


Top 50 recent answers are included