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. Dismiss Notice

Getting a healthbar above the player in 2D space?

Discussion in 'Scripting' started by RaulG, Mar 9, 2015.

  1. RaulG

    RaulG

    Joined:
    May 31, 2013
    Posts:
    74
    Anyone have a decent tutorial for this? Most of them have it in the corner.
     
  2. KamikazeCoPilot

    KamikazeCoPilot

    Joined:
    Mar 13, 2014
    Posts:
    12
    Have you thought about creating the object itself and posting it above the character as a child?
     
  3. RaulG

    RaulG

    Joined:
    May 31, 2013
    Posts:
    74
    That's actually what a tutorial I found said to do!
     
  4. KamikazeCoPilot

    KamikazeCoPilot

    Joined:
    Mar 13, 2014
    Posts:
    12
    Have you tried it yet?
     
  5. RaulG

    RaulG

    Joined:
    May 31, 2013
    Posts:
    74
    Yeah worked like a charm.

    Although now I gotta figure out how to put one on all the Enemy Objects.
     
  6. JustJeff

    JustJeff

    Joined:
    Feb 16, 2015
    Posts:
    84
    Make it a child of the enemies :D

    You could just add it to your enemy prefab(s) above them.