0
\$\begingroup\$

Edit: I've slightly edited this question because I've found the symptom for my problem, but not why the actions I've noticed cause the issue.

I have what appears (via the inspector) to be two identical 2D objects containing only a transform and a Sprite Renderer.

One was created by dragging a png from a folder onto the screen, and it displays normally.

The other was created by going to the hierarchy and right click > 2D Object > Sprite, and dragging the desired picture into the object's 'Sprite' Field.

Both objects appear in the development view, but only the first one appears in the game view. Why does the second object not appear?

All other settings for Unity (environment, camera, etc) are the default for a 2D project.

Here are the inspectors for...

The sprite that is displaying:

Displaying

The sprite that is not displaying:

Not Displaying

And my Camera:

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ Check your camera. We do not have enough information to do anything more than speculate. \$\endgroup\$
    – Evorlor
    Oct 12, 2019 at 4:43
  • \$\begingroup\$ Can you show us the inspector for both objects, and for your camera? With this detail, we should be able to reconstruct your scene in a new empty project to try to reproduce the problem you're seeing. \$\endgroup\$
    – DMGregory
    Oct 12, 2019 at 10:48
  • \$\begingroup\$ I've edited the question to show inspectors. \$\endgroup\$
    – Aetherfox
    Oct 12, 2019 at 16:45
  • \$\begingroup\$ What version of Unity are you using? I have actually experienced the same thing using Unity19.2.xx (do not remember precisely), whereas I had no problems until the latest versions of 2018, so maybe it is "just" a Unity bug. \$\endgroup\$
    – FSic
    Oct 14, 2019 at 7:23

1 Answer 1

1
\$\begingroup\$

From what I see of the values you're using, it appears that New Sprite object is actually BEHIND and not aligned with the camera. So the camera can't see it, and display it. It'd explain why you can see it in the Scene view but not in the Game view.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .