TopDown Engine  v4.1
MoreMountains.Tools.MMGizmo Class Reference

Add this component to an object and it'll let you display a gizmo for its position or collider, and an optional text More...

Inheritance diagram for MoreMountains.Tools.MMGizmo:

Public Types

enum  GizmoTypes { GizmoTypes.None, GizmoTypes.Collider, GizmoTypes.Position }
 the possible types of gizmos to display More...
 
enum  DisplayModes { DisplayModes.Always, DisplayModes.OnlyWhenSelected }
 whether to display gizmos always or only when the object is selected More...
 
enum  PositionModes {
  PositionModes.Point, PositionModes.Cube, PositionModes.WireCube, PositionModes.Sphere,
  PositionModes.WireSphere, PositionModes.Texture, PositionModes.Arrows, PositionModes.RightArrow,
  PositionModes.UpArrow, PositionModes.ForwardArrow, PositionModes.Lines, PositionModes.RightLine,
  PositionModes.UpLine, PositionModes.ForwardLine
}
 the shape of the gizmo to display the position of the object More...
 
enum  TextModes {
  TextModes.GameObjectName, TextModes.CustomText, TextModes.Position, TextModes.Rotation,
  TextModes.Scale, TextModes.Property
}
 what to display as text for that gizmo More...
 
enum  ColliderRenderTypes { ColliderRenderTypes.Full, ColliderRenderTypes.Wire }
 when displaying a collider, whether to display a full or wire gizmo More...
 

Public Attributes

bool DisplayGizmo = true
 if this is true, gizmos will be displayed, if this is false, gizmos won't be displayed More...
 
GizmoTypes GizmoType = GizmoTypes.Position
 what the gizmos should represent. Collider will show the bounds of the associated collider, Position will show the position of the object More...
 
DisplayModes DisplayMode = DisplayModes.Always
 whether gizmos should always be displayed, or only when selected More...
 
Color GizmoColor = MMColors.ReunoYellow
 the color of the collider or position gizmo More...
 
PositionModes PositionMode = PositionModes.Point
 the shape of the gizmo when in position mode More...
 
Texture PositionTexture
 the texture to display as a gizmo when in position & texture mode More...
 
Vector2 TextureSize = new Vector2(50f,50f)
 the size of the texture to display as a gizmo More...
 
float PositionSize = 0.2f
 the size of the gizmo when in position mode More...
 
ColliderRenderTypes ColliderRenderType = ColliderRenderTypes.Full
 whether to display the collider gizmo as a wire or a full mesh More...
 
float ViewDistance = 20f
 the distance from the scene view camera beyond which the gizmo won't be displayed More...
 
Vector3 GizmoOffset = Vector3.zero
 an offset to apply when drawing a collider or position gizmo More...
 
bool LockX = false
 whether or not to lock the position of the gizmo on the x axis, regardless of the position of the object More...
 
float LockedX = 0f
 the position at which to put the gizmo when locked on the x axis More...
 
bool LockY = false
 whether or not to lock the position of the gizmo on the y axis, regardless of the position of the object More...
 
float LockedY = 0f
 the position at which to put the gizmo when locked on the y axis More...
 
bool LockZ = false
 whether or not to lock the position of the gizmo on the z axis, regardless of the position of the object More...
 
float LockedZ = 0f
 the position at which to put the gizmo when locked on the z axis More...
 
bool DisplayText = false
 whether or not to display text on that gizmo More...
 
TextModes TextMode
 what to display as text for that gizmo (some custom text, the object's name, position, rotation, scale, or a target property) More...
 
string TextToDisplay = "Some Text"
 when in CustomText mode, the text to display on that gizmo More...
 
Vector3 TextOffset = new Vector3(0f, 0.5f, 0f)
 the offset to apply to the text More...
 
FontStyle TextFontStyle = FontStyle.Normal
 what style to use for the text's font More...
 
int TextSize = 12
 the size of the text's font More...
 
Color TextColor = MMColors.ReunoYellow
 the color in which to display the gizmo's text More...
 
Color TextBackgroundColor = new Color(0,0,0,0.3f)
 the color of the background behind the text More...
 
Vector4 TextPadding = new Vector4(5,0,5,0)
 the padding to apply to the text's background More...
 
float TextMaxDistance = 14f
 the distance from the scene view camera beyond which the gizmo text won't be displayed More...
 
MMPropertyPicker TargetProperty
 when in Property mode, the property whose value to display on the gizmo More...
 

Protected Member Functions

virtual void Awake ()
 If we're not in editor, we disable ourselves More...
 

Properties

virtual bool Initialized [get, set]
 
virtual SphereCollider _sphereCollider [get, set]
 
virtual BoxCollider _boxCollider [get, set]
 
virtual MeshCollider _meshCollider [get, set]
 
virtual CircleCollider2D _circleCollider2D [get, set]
 
virtual BoxCollider2D _boxCollider2D [get, set]
 
virtual Vector3 _vector3Zero [get, set]
 
virtual Vector3 _newPosition [get, set]
 
virtual Vector2 _worldToGUIPosition [get, set]
 
virtual Rect _textureRect [get, set]
 
virtual GUIStyle _textGUIStyle [get, set]
 
virtual string _textToDisplay [get, set]
 
virtual bool _sphereColliderNotNull [get, set]
 
virtual bool _boxColliderNotNull [get, set]
 
virtual bool _meshColliderNotNull [get, set]
 
virtual bool _circleCollider2DNotNull [get, set]
 
virtual bool _boxCollider2DNotNull [get, set]
 
virtual bool _positionTextureNotNull [get, set]
 

Detailed Description

Add this component to an object and it'll let you display a gizmo for its position or collider, and an optional text

Member Enumeration Documentation

◆ ColliderRenderTypes

when displaying a collider, whether to display a full or wire gizmo

Enumerator
Full 
Wire 

◆ DisplayModes

whether to display gizmos always or only when the object is selected

Enumerator
Always 
OnlyWhenSelected 

◆ GizmoTypes

the possible types of gizmos to display

Enumerator
None 
Collider 
Position 

◆ PositionModes

the shape of the gizmo to display the position of the object

Enumerator
Point 
Cube 
WireCube 
Sphere 
WireSphere 
Texture 
Arrows 
RightArrow 
UpArrow 
ForwardArrow 
Lines 
RightLine 
UpLine 
ForwardLine 

◆ TextModes

what to display as text for that gizmo

Enumerator
GameObjectName 
CustomText 
Position 
Rotation 
Scale 
Property 

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMGizmo.Awake ( )
protectedvirtual

If we're not in editor, we disable ourselves

Member Data Documentation

◆ ColliderRenderType

ColliderRenderTypes MoreMountains.Tools.MMGizmo.ColliderRenderType = ColliderRenderTypes.Full

whether to display the collider gizmo as a wire or a full mesh

◆ DisplayGizmo

bool MoreMountains.Tools.MMGizmo.DisplayGizmo = true

if this is true, gizmos will be displayed, if this is false, gizmos won't be displayed

◆ DisplayMode

DisplayModes MoreMountains.Tools.MMGizmo.DisplayMode = DisplayModes.Always

whether gizmos should always be displayed, or only when selected

◆ DisplayText

bool MoreMountains.Tools.MMGizmo.DisplayText = false

whether or not to display text on that gizmo

◆ GizmoColor

Color MoreMountains.Tools.MMGizmo.GizmoColor = MMColors.ReunoYellow

the color of the collider or position gizmo

◆ GizmoOffset

Vector3 MoreMountains.Tools.MMGizmo.GizmoOffset = Vector3.zero

an offset to apply when drawing a collider or position gizmo

◆ GizmoType

GizmoTypes MoreMountains.Tools.MMGizmo.GizmoType = GizmoTypes.Position

what the gizmos should represent. Collider will show the bounds of the associated collider, Position will show the position of the object

◆ LockedX

float MoreMountains.Tools.MMGizmo.LockedX = 0f

the position at which to put the gizmo when locked on the x axis

◆ LockedY

float MoreMountains.Tools.MMGizmo.LockedY = 0f

the position at which to put the gizmo when locked on the y axis

◆ LockedZ

float MoreMountains.Tools.MMGizmo.LockedZ = 0f

the position at which to put the gizmo when locked on the z axis

◆ LockX

bool MoreMountains.Tools.MMGizmo.LockX = false

whether or not to lock the position of the gizmo on the x axis, regardless of the position of the object

◆ LockY

bool MoreMountains.Tools.MMGizmo.LockY = false

whether or not to lock the position of the gizmo on the y axis, regardless of the position of the object

◆ LockZ

bool MoreMountains.Tools.MMGizmo.LockZ = false

whether or not to lock the position of the gizmo on the z axis, regardless of the position of the object

◆ PositionMode

PositionModes MoreMountains.Tools.MMGizmo.PositionMode = PositionModes.Point

the shape of the gizmo when in position mode

◆ PositionSize

float MoreMountains.Tools.MMGizmo.PositionSize = 0.2f

the size of the gizmo when in position mode

◆ PositionTexture

Texture MoreMountains.Tools.MMGizmo.PositionTexture

the texture to display as a gizmo when in position & texture mode

◆ TargetProperty

MMPropertyPicker MoreMountains.Tools.MMGizmo.TargetProperty

when in Property mode, the property whose value to display on the gizmo

◆ TextBackgroundColor

Color MoreMountains.Tools.MMGizmo.TextBackgroundColor = new Color(0,0,0,0.3f)

the color of the background behind the text

◆ TextColor

Color MoreMountains.Tools.MMGizmo.TextColor = MMColors.ReunoYellow

the color in which to display the gizmo's text

◆ TextFontStyle

FontStyle MoreMountains.Tools.MMGizmo.TextFontStyle = FontStyle.Normal

what style to use for the text's font

◆ TextMaxDistance

float MoreMountains.Tools.MMGizmo.TextMaxDistance = 14f

the distance from the scene view camera beyond which the gizmo text won't be displayed

◆ TextMode

TextModes MoreMountains.Tools.MMGizmo.TextMode

what to display as text for that gizmo (some custom text, the object's name, position, rotation, scale, or a target property)

◆ TextOffset

Vector3 MoreMountains.Tools.MMGizmo.TextOffset = new Vector3(0f, 0.5f, 0f)

the offset to apply to the text

◆ TextPadding

Vector4 MoreMountains.Tools.MMGizmo.TextPadding = new Vector4(5,0,5,0)

the padding to apply to the text's background

◆ TextSize

int MoreMountains.Tools.MMGizmo.TextSize = 12

the size of the text's font

◆ TextToDisplay

string MoreMountains.Tools.MMGizmo.TextToDisplay = "Some Text"

when in CustomText mode, the text to display on that gizmo

◆ TextureSize

Vector2 MoreMountains.Tools.MMGizmo.TextureSize = new Vector2(50f,50f)

the size of the texture to display as a gizmo

◆ ViewDistance

float MoreMountains.Tools.MMGizmo.ViewDistance = 20f

the distance from the scene view camera beyond which the gizmo won't be displayed

Property Documentation

◆ _boxCollider

virtual BoxCollider MoreMountains.Tools.MMGizmo._boxCollider
getset

◆ _boxCollider2D

virtual BoxCollider2D MoreMountains.Tools.MMGizmo._boxCollider2D
getset

◆ _boxCollider2DNotNull

virtual bool MoreMountains.Tools.MMGizmo._boxCollider2DNotNull
getset

◆ _boxColliderNotNull

virtual bool MoreMountains.Tools.MMGizmo._boxColliderNotNull
getset

◆ _circleCollider2D

virtual CircleCollider2D MoreMountains.Tools.MMGizmo._circleCollider2D
getset

◆ _circleCollider2DNotNull

virtual bool MoreMountains.Tools.MMGizmo._circleCollider2DNotNull
getset

◆ _meshCollider

virtual MeshCollider MoreMountains.Tools.MMGizmo._meshCollider
getset

◆ _meshColliderNotNull

virtual bool MoreMountains.Tools.MMGizmo._meshColliderNotNull
getset

◆ _newPosition

virtual Vector3 MoreMountains.Tools.MMGizmo._newPosition
getset

◆ _positionTextureNotNull

virtual bool MoreMountains.Tools.MMGizmo._positionTextureNotNull
getset

◆ _sphereCollider

virtual SphereCollider MoreMountains.Tools.MMGizmo._sphereCollider
getset

◆ _sphereColliderNotNull

virtual bool MoreMountains.Tools.MMGizmo._sphereColliderNotNull
getset

◆ _textGUIStyle

virtual GUIStyle MoreMountains.Tools.MMGizmo._textGUIStyle
getset

◆ _textToDisplay

virtual string MoreMountains.Tools.MMGizmo._textToDisplay
getset

◆ _textureRect

virtual Rect MoreMountains.Tools.MMGizmo._textureRect
getset

◆ _vector3Zero

virtual Vector3 MoreMountains.Tools.MMGizmo._vector3Zero
getset

◆ _worldToGUIPosition

virtual Vector2 MoreMountains.Tools.MMGizmo._worldToGUIPosition
getset

◆ Initialized

virtual bool MoreMountains.Tools.MMGizmo.Initialized
getset

The documentation for this class was generated from the following file: