Gizmos Docs

Overview

Runtime Gizmos are the runtime 3D controls that are used to manipulate items in the scene. Unlike transform handles, gizmos does not modify the transformation of objects. Instead, they are used to modify colliders, bounding boxes and properties of light and audio sources. All gizmos, their base classes, rendering classes and shaders can be found in /Battlehub/RTEditor/Runtime/RTGizmos and /Battlehub/RTEditor/Content/Runtime/RTGizmos folders.

Note

In this section, Runtime Gizmos is simply called "gizmos".

Getting Started

Here are several simple steps to get started with gizmos:

  1. Create a Cube using Create->3D Object->Cube
  2. Select Cube.
  3. Add Assets BoxColliderGizmo component.
  4. Hit Play.
  5. Use mouse left-click + drag to resize Box Collider Gizmo.
  6. Note that Center and Size properties of Box Collider have been changed.

Screenshot

Base Gizmo

Source code of Base Gizmo can be found in Battlehub/RTEditor/Runtime/RTGizmos/BaseGizmo.cs. This is the base class of Box Gizmo, Sphere Gizmo, Capsule Gizmo and Cone Gizmo. Therefore all these gizmos have following settings:

  • Grid Size – step size used in unit snapping mode (default: 1.0).
  • Line Color – color of line.
  • Handles Color – color of handle (small quad).
  • Selection Color – color of selected handle.
  • Enable Undo – if set to true then gizmo will write all changes to undo stack (default: true).
  • Unit Snap Key – key switching gizmo to unit snapping mode.
  • Target – target object reference;

Box Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/BoxGizmo.cs.
Base class for all gizmos that have box shape:

Sphere Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/SphereGizmo.cs.
Base class for all gizmos that have sphere shape:

Capsule Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/CapsuleGizmo.cs.
Base class for all gizmos that have capsule shape:

Cone Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/ConeGizmo.cs. Base class for all gizmos that have cone shape:

Box Collider Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/BoxColliderGizmo.cs.
Box Collider Gizmo can be added to object with Box Collider:

  1. Create Game Object with Box Collider.
  2. Add Box Collider Gizmo component.

Screenshot

Sphere Collider Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/SphereColliderGizmo.cs.
Sphere Collider Gizmo can be added to object with Sphere Collider:

  1. Create Game Object with Sphere Collider.
  2. Add Sphere Collider Gizmo component.

Screenshot

Capsule Collider Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/CapsuleColliderGizmo.cs.
Capsule Collider Gizmo can be added to object with Capsule Collider:

  1. Create Game Object with Capsule Collider.
  2. Add Capsule Collider Gizmo component.

Screenshot

Point Light Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/PointLightGizmo.cs.
Point Light Gizmo can be added to Point Light:

  1. Create Point Light.
  2. Add LightGizmo component.

Screenshot

Spot Light Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/SpotLightGizmo.cs.
Spot Light Gizmo can be added to Spot Light:

  1. Create Spot Light.
  2. Add LightGizmo component.

Screenshot

Directional Light Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/DirectionalLightGizmo.cs. Directional Light Gizmo can be added to Directional Light

  1. Create Directional Light.
  2. Add Light Gizmo component.

Screenshot

Audio Source Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/AudioSourceGizmo.cs.
Audio Source Gizmo can be added to Audio Source

  1. Create Audio Source.
  2. Add Audio Source Gizmo component.

Screenshot

Audio Reverb Zone Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/AudioReverbZoneGizmo.cs.
Same as AudioSouce Gizmo

Skinned Mesh Renderer Gizmo

Located in Battlehub/RTEditor/Runtime/RTGizmos/SkinnedMeshRendererGizmo.cs.
Skinned Mesh Renderer Gizmo can be added to object with SkinnedMesh

  1. Create GameObject with SkinnedMeshRenderer.
  2. Add Skinned Mesh Renderer Gizmo component.

Screenshot