Search Unity

Sorting layers aren't working?

Discussion in '2D' started by mikejahansdev, Jul 7, 2019.

  1. mikejahansdev

    mikejahansdev

    Joined:
    Jul 4, 2019
    Posts:
    2
    I imported some temporary art to my project, but it prevents my enemy from being visible. The hearts you see act as place-holder enemies, and they show fine with the sorting layer, so why doesn't the rectangle show?

    Also worth mentioning that earlier the camera wasn't displaying the art either, but it randomly decided to?

    May be worth saying;
    - I'm using a virtual camera setup
    - I've tried the Z-axis changes but it doesn't work
    - I'm back in Unity after a significant break, so there's a lot of new stuff I don't understand, maybe I messed up

    I've attached some images that may help find the solution.

    unity.jpg unity3.jpg unity2.jpg
     
  2. Wezai

    Wezai

    Joined:
    Dec 30, 2016
    Posts:
    74
    Could be the material type. If you change it to Sprite Lit/Default does it show up? It's in the Sprite Renderer component of your game object. White blocks usually mean the sprite is missing or the renderer can't handle that type of material for 2D.
     
    VSMent and mikejahansdev like this.
  3. mikejahansdev

    mikejahansdev

    Joined:
    Jul 4, 2019
    Posts:
    2
    I'm not sure if this is 100% the problem, but changing it to the default 2d sprite helped! Thanks a load, man :)