Search Unity

How to enable lighting on 2D animations?- Answered

Discussion in '2D' started by outoftune1, May 5, 2019.

  1. outoftune1

    outoftune1

    Joined:
    Jan 22, 2019
    Posts:
    2
    Here's my issue, I have some animations in my player object, running jumping, all that good stuff. But when I add some lighting to my scene, everything gets lit up except for my player. I've checked the Z position of my camera and my player, changed the material to sprite/defuse, played with the intensity of the light object. I did a few Google searches and I guess no one else is having this problem? Any help would be appreciated.
     
    Last edited: May 6, 2019
  2. Hyblademin

    Hyblademin

    Joined:
    Oct 14, 2013
    Posts:
    725
    Are you using any custom shaders? Double check your material configuration. If your actor is using a different material than the background objects, try temporarily switching the material to a different one to see if it starts to receive lighting.
     
  3. outoftune1

    outoftune1

    Joined:
    Jan 22, 2019
    Posts:
    2
    I not using any custom shaders, ive tried switching materials, and even creating a totally new one just to make sure. Think it matters what format the animation came from? (Individual png files)

    EDIT: I figured it out, for some reason the Z on the scale has to be zero or there will be no lighting.. strange.
     
    Last edited: May 6, 2019