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

Before using any of mesh renderers you must intialize your scene properly. Don’t worry if you forget to do so. When you try to create any mesh renderer, Energy Bar Toolkit will tell you that scene must be initialized first and will open Init Tool for you.

In order to initialize a scene please run the Init Tool from Tools → Energy Bar Toolkit → Init Tool.

Here you can setup two things:

  • Root Name
  • Layer

Root Name is the name of root object in your Hierarchy. By default it’s Energy Bar Toolkit because you need only one of these. All mesh bars will be held inside.

You can also choose Layer on which GUI will be painted.

Initializing scene means to create 3 objects that are essential for mesh renderers to work. These are:

  • Root object
  • 2D Camera
  • Panel

Root object is responsible for resolution and scalling, 2D Camera is the view of your GUI, and Panel is actual renderer of all your objects.

Root object

Root object is responsible for scaling your GUI. By default it’s called Energy Bar Toolkit as you can see in the image above.

There are two Resize Modes that you can use for your GUI:

  • Fixed Size
  • Pixel Perfect

Fixed Size

Keep your panel always at the same size of Manual Height. Other two parameters are ignored.

Pixel Perfect

Tries to match your GUI pixels to screen pixels one-to-one, but only if your Screen.height is between Minimum Height and Maximum Height. If your Screen.height goes beyound these boundaries then your GUI will scale similarly to Fixed Size mode.

2D Camera

2D Camera is the view of your GUI. It’s Culling Mask is set to display only the layer that you’ve choosen before. Clear Flags is set based on what is on the scene at the moment of initialization:

  • If there’s no cameras then Clear Flags is set to Skybox
  • If there is at least one camera then Clear Flags is set to Depth only

Read more about Camera component

Panel

Panel is a place where everything is actually painted. Think about it as a blackboard for your GUI elements. You just need to know that it’s there and all sprites and mesh bars should be placed underneath ( they are by default).