Game Object Appears in Scene View but not in Game View

前端 未结 4 2383
深忆病人
深忆病人 2021-02-20 07:19

Seems like I am missing something here, using latest version of unity and I am instantiating a gameobject on click.. It appears fine in scene View but not in the game view?

4条回答
  •  渐次进展
    2021-02-20 07:44

    By default in a 2D scene the camera is pointing to positive Z and it is located at (0 1 -10). This means that the Z position of the sprite needs to be higher than cameras Z position, not lower.

    Also check that Sprite Renderer of the sprite is enabled in the "Inspector" view.

    If those doesn't help I would suggest starting to remove other GameObjects at run time to see if the sprite is behind something. Just click on a GameObject at "Hierarchy" view and hit delete key.

    Hopefully some of these help you to find the problem.

提交回复
热议问题