Search Unity

Healthbar Script

Discussion in 'Assets and Asset Store' started by steego, Jun 28, 2011.

  1. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    A simple healthbar script for Unity can be downloaded for free from my page at http://randomrnd.com/projects/healthbar/

    About

    A simple healthbar script for Unity. Lets you easily add a healthbar to an object, and update it.
    There are two methods included, one that changes the actual texture, and one that is shader based (recommended).
    To work correctly, the UV mapping of the object (refered to as canvas) has to be set correctly.
    If you are using the texture-modifying method, it is recommended to keep the resolution of the texture as low as possible.
    Modifying the texture while running is costly for the GPU, and so you might encounter performance problems if you have a lot of healthbars displayed that are all updated simultaneously.
    If you are using the shader based version, these problems should not be an issue.

    Changelog


    • 1.1 Added shader based healthbar
    • 1.0 Initial version
     
    Last edited: Aug 5, 2011
  2. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    I have now updated this with a shader based version which is a lot more resource friendly.
     
  3. onllm

    onllm

    Joined:
    Mar 4, 2011
    Posts:
    111
    thx for sharing will check this out later
     
  4. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,997
    Looks cool, I'll have to check this out!