- Home /
my game object won't show up in the game world
so i have an "empty" game object with a sprite renderer added to it and a sprite assigned to the sprite renderer. i can place it in the world in the editor and it correctly displays that sprite. however, it doesn't show up in the game view or when i run the project. that's pretty much my problem.
i looked at a tutorial where some guy did the same thing and he had no trouble getting the game object to display. the reason i'm doing this is to have an object that moves and animates and so on. but i have to get step one right first before i can move on to that. i've checked a few things including layers and that doesn't seem to be the problem ....
A screenshot of your scene would help. Is your renderer definitely within the frustrum and clip planes of your camera?
Is your camera directed at the sprite? And is it looking at the sprite from the right direction?
https://postimg.org/image/ya03i4szj/ scene view you can see the two game object sprites in the green background. like i said i tried removing the background, didn't do anything. the camera is definitely over the sprites. even if it wasn't, my script should move the game objects to my cursor anyway.
https://postimg.org/image/w8w3ji2f7/ here's a second capture with the camera's inspector shown. as far as i can tell i had a plain sprite object in the green area before, and that showed fine. it's just the sprite renderer-game object thingies that are giving me a problem.
Answer by gibberingmouther · Jan 24, 2017 at 11:24 PM
my depth was off. it was the same as the camera's, -10, and i had to set it to 0. solved! yipeeeeeeeee
Your answer
![](https://koobas.hobune.stream/wayback/20220612105451im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2d Sprite Animation Editor Scripting. 2 Answers
Hide parts of the sprite in 2D? 0 Answers
How to manage 2D sprite animations correctly? 0 Answers
Play 2 Animations in 1 controller 0 Answers