This rendering method is now deprecated. You can still use it, but it’s highly recommended to switch to uGUI.

Introduction

Transform Renderer is renderer that allows you to indicate progress using position translate, scale, or rotation of texture object in 2D space. The most common usage of this renderer is to create speedometers, clocks, or other kinds of gauges.

Usage

Before you can add new mesh bar you must initialize your scene. Don’t worry if you forget to do so; When creating new renderer you will be reminded that scene is currently uninitialized.

In order to create a new Mesh Transform Renderer bar select Tools → Energy Bar Toolkit → Old →Mesh Bars → Transform from the main menu.

You should see the result immediately:

Configuration

In order to make things easier, Inspector of Energy Bar Sequence Renderer is split to 5 different sections: Textures, Position & Size, Appearance, Object Transform, and Effects. Let’s start with…

Textures

  • Texture Mode – Here you can choose if you want to use textures files or an atlas. If you want to reduce number of draw calls, you should read more about atlases.
  • Background Textures (optional) – Textures to draw on background.
  • Object Texture – The texture of object that will be transformed. It can be later set to move, rotate, and scale.
    • Texture Anchor – Texture object anchor point it’s normalized pixel coordinate. [0, 0] is top-left corner.
  • Foreground Textures (optional) – Textures to draw on top layer.
  • Premultiplied Alpha – Tells that textures have its RGB components multiplied by alpha component. Read more.
Example textures for this renderer are placed in Energy Bar Tollkit/Example/Textures/ClockBar
It’s good practice to make background and foreground layers in grayscale.

Position & Size

This section is widely described in Mesh Filled Renderer and it’s functionality is identical across all renderers.

Appearance

Here you can setup how your bar should appear to the user (except textures setup).

  • Draw Label – Draw label on top of your bar.
  • Label Font – Font created by Tools → Energy Bar Toolkit → Create Font.
  • Label Position – Place where to draw label.
  • Normalized – Normalizes label position from 0,0 (bottom-left) to 1,1 (top-right)
  • Pivot Point – The pivot point of label object.
  • Label Format – Format of the label. See description below.
  • Label Color – Fill color of this label.

Object Transform

This is most unique part of transform renderer. It decides how Texture Object should be transformed through time (progress).

  • Translate – If enabled the object position will be translated.
    • Start Point – Translation start point. 0, 0 is always center of texture. Coordinates are normalized so -0.5, -0.5 is top-left corner.
    • End Point – Translation end point.
  • Rotate – If enabled the object rotation will be changed.
    • Start Angle – Start angle in degrees counter-wise.
    • End Angle – End angle in degrees counter-wise.
  • Scale – If enabled the object scale will be changed.
    • Start Scale – Local scale start value.
    • End Scale – Local scale end value.

Effects

  • Smooth Effect – Smoothly animated growing and shrinking.
  • Smooth Speed – How fast animation will be progressing.