Bar Display LPK_BarDisplay.cs

This component controls the appearance of a display bar such as a health or cooldown bar. You can use this with sprites, images, or raw images. If using a sprite, set the pivot point in the Sprite Editor to determine how the bar should scale. This can be done in the editor for raw images and images.

Suggested use:

Create an Image UI object, and put the Sprite Renderer component on it. This allows you to use the Bar Display on a UI element. Connect to a Counter or Timer to display their values using a bar that changes proportionally.

Examples found in: Project 3

Components
Property Type Description Default Value
Component Properties
Display Mode LPK Bar Display Mode Display mode for the bar. Horziontal = scales the bar based on the X axis. Vertical = scales the bar based on the Y axis. HORIZONTAL
Max X Scale Float Set the scale the bar sprite will be at when representing 100%. It should ideally match the scale of the sprite in the Rect Transform. 1
Debug Properties
Print Debug Info Boolean Toggle console debug messages. False
Label String Notes for the user about this component. This does nothing to the game or build. None