Sprite Meter
A Sprite Meter displays a value by updating a SpriteRenderer in world space.
This is ideal for:
- World-space health bars
- Enemy stamina or charge bars
- In-world progress indicators attached to objects
- Frame-based or segmented sprite meters
Widget setup:
- Add and configure a Sprite Meter component.
- Update the meter with a Sprite Meter Update action.
- Optionally set range and value together with Sprite Meter Set Values.
Sprite Meter Component
Add Component -> PlayMaker -> Widgets -> Sprite Meter
Parameters
| Field | Description |
|---|---|
| Value | Current meter value. In edit mode, this is used for preview. |
| Min Value | Value corresponding to an empty meter. |
| Max Value | Value corresponding to a full meter. |
| Clamp To Range | Keeps values within Min/Max before normalizing. |
| Invert | Reverses normalized output (1 - t). |
| Target | SpriteRenderer to update. |
| Fill Method | How the meter is visualized: ScaleTransform, ResizeSprite, or AnimationFrames. |
| Axis | Axis to apply fill on (X or Y) for scale/resize methods. |
| Anchor Mode | Which side stays fixed while filling: Center, Start, or End. |
| Frames | Sprite list used by AnimationFrames (first = empty, last = full). |
| Update Label | Optional Meter Label to update when the meter changes. |
| Use Color Gradient | If enabled, drives SpriteRenderer.color from a gradient. |
| Color Gradient | Gradient evaluated from 0 to 1 (min to max). |
| Update In Edit Mode | When enabled, updates automatically in the editor for previewing. |
Notes:
ScaleTransformscales the transform and is best for simple bars.ResizeSpritechangesSpriteRenderer.sizeand works best with size-friendly sprite setups (for example sliced/tiled workflows).AnimationFramesmaps normalized values to a frame index for discrete visual steps.
Actions
Sprite Meter uses these actions:
Tips
- Use
ScaleTransformfor lightweight bars andResizeSpritefor sprite-driven UI look. - Use
AnimationFrameswhen you want clear visual steps (for example 10 frame-based segments). - Pick
Anchor Mode: Startto keep left/bottom edges fixed, orEndto keep right/top edges fixed. - Enable Use Color Gradient for state feedback such as green-to-red health.