Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

how to make life bar for enemies

Discussion in 'Immediate Mode GUI (IMGUI)' started by mois3sk9, Oct 25, 2014.

  1. mois3sk9

    mois3sk9

    Joined:
    Oct 25, 2014
    Posts:
    1
    hi guys, i have a little problem, because i'm trying to create a life bars for my enemies game just like the next picture



    does any one has any idea how to make it? if any one know how to, i'll apreciate it
     
  2. 420BlazeIt

    420BlazeIt

    Joined:
    Aug 14, 2014
    Posts:
    102
    Good question.
     
  3. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I think I have a decent way of doing it, but there seems to be something weird going on with accessing canvas component values via scripting for me. When I get answers to those questions, I might be able to show you guys how to do it.

    But I'm also working with Unity 5.0 right now, so I'm not sure if it's a uGUI problem in general, or if it's a Unity 5.0 problem.


    *Nevermind just saw this was for the older Unity GUI system? So disregard this, unless you were talking about the new "uGUI" that came out in 4.6? Sorry.
     
    Last edited: Nov 13, 2014