Skip to main content

GizmosHelper

A class in Root.Township, Alta.Intelligence.

Editor debugging helper that draws a small sphere at a static position in the Scene view. Nothing in the code creates it.

Constructors​

MemberWhat it is
GizmosHelper()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
static Vector3 positionWhere the sphere is drawn. Set it from anywhere.
1 private and internal field
MemberWhat it is
private static GizmosHelper helperThe single instance, made by EnsureExist.

Methods​

MemberWhat it is
static void EnsureExist()Creates a "Gizmos Helper" GameObject with this component if there isn't one.
2 private and internal methods
MemberWhat it is
private void OnDestroy()Clears the static instance if it's this one.
private void OnDrawGizmos()Draws a 0.1 radius sphere at position.