Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Can't manage to get light maps to work.

Discussion in '2D' started by OneSketchyGuy, Jan 25, 2018.

  1. OneSketchyGuy

    OneSketchyGuy

    Joined:
    Oct 27, 2016
    Posts:
    14
    I used this video to try to get dynamic lighting into my unity game:


    Being that I liked the style of lighting I kept it, however upon trying it out for myself I failed to execute it properly.

    Any suggestions?

    It seems to work while in editor mode, but once I hit play pflpt, all I see is a black character.
     

    Attached Files:

    • 2.png
      2.png
      File size:
      19.9 KB
      Views:
      658
    • 3.png
      3.png
      File size:
      25.4 KB
      Views:
      695
    • 1.png
      1.png
      File size:
      10.8 KB
      Views:
      727
  2. OneSketchyGuy

    OneSketchyGuy

    Joined:
    Oct 27, 2016
    Posts:
    14
    Update, when I add the same steps to a new object, it works.

    So I tried creating a duplicate player and trying to narrow down the problem.

    The sprite works fine.

    *Copied Physics components over. (Including the controller2D(a ray cast instead of a rigid body. I am also using a static rigid body, for collisions I haven't gotten around to fixing yet.))

    Physics are fine.

    *Copied over animator.

    Still working fine.

    *Copied over the "Player" script, as well as the "Player Input" handler.

    Still working fine.

    Upon copying over Player Controller(Animation and basic action handler) The lighting stopped working.

    Removing the component did not fix the problem however. So the problem lays in the player controller?
     
    Last edited: Feb 1, 2018
  3. OneSketchyGuy

    OneSketchyGuy

    Joined:
    Oct 27, 2016
    Posts:
    14
    Update!

    I removed the player flipx when facing left/right

    Works now.

    I only need to figure out how to get it to work with the flip x now.
     
  4. OneSketchyGuy

    OneSketchyGuy

    Joined:
    Oct 27, 2016
    Posts:
    14
    Update

    I just switched to a sprite diffuse.

    The player in 2d/3d isnt working. I'll finger it out another time.
     
  5. OneSketchyGuy

    OneSketchyGuy

    Joined:
    Oct 27, 2016
    Posts:
    14
    Still need help on this, I cant flip my player!