0
\$\begingroup\$

I am quite new to unity and currenty I'm practicing with a 2D topdown game.

I created a tile map with "tiled", imported it in Unity with "TiledToUnity" and changed some things like player movement, camera and so on.

Now I wanted to create collectible coins. So I created a new 2D Sprite and added the picture of the coin I had to it. But the picture of the coin did not change. I tried the same with adding a material with the coin as picture but it did not work out either.

To check if the object is even there I added a collide box to the coin and my player body did indeed collide.

What did I do wrong while adding a picture to the sprite?

Thanks in advance!

(Sorry fotgot the pictures. ) -- Edit--

Added Emission yellow color where transparency should be.

\$\endgroup\$
7
  • \$\begingroup\$ Do you have code or images of your work space so we can see what you are doing/trying to do? \$\endgroup\$ – n_plum Mar 23 '17 at 12:45
  • \$\begingroup\$ Sorry, forgot them. \$\endgroup\$ – derfium Mar 23 '17 at 12:50
  • \$\begingroup\$ hmm maybe coin is behind of the map! in Sprite Renderer there is option as order in layer , change it to bigger number than 1 like 2. \$\endgroup\$ – Seyed Morteza Kamali Mar 23 '17 at 13:31
  • \$\begingroup\$ Already tried that. I also created a new layer for the coins and hid the default layer with the map and player but i still did not see the material. \$\endgroup\$ – derfium Mar 23 '17 at 13:44
  • \$\begingroup\$ I found something that might help. I changed the Emission of the material inside the obejct inspector and added the picture of the coin there. Now i see coin image, but the transparent part of it now has a yellow-ish color. Added pictured to my main post. \$\endgroup\$ – derfium Mar 23 '17 at 13:49
0
\$\begingroup\$

After changing the Shader of the material to Sprite -> Default the problem was fixed.

\$\endgroup\$
2
  • \$\begingroup\$ Are you using lighting in your scene? If not, you might want to use a simpler shader than the PBR "Standard" - it will be more lightweight to render and won't require hacks like doubling-up a texture in the emissive channel. The default Sprite material should be all you need. \$\endgroup\$ – DMGregory Mar 23 '17 at 16:46
  • \$\begingroup\$ As stated in a comment under my question I did already change that. \$\endgroup\$ – derfium Mar 23 '17 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.