Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.CharacterInspector Class Reference

Inspector for characters classes. More...

Inheritance diagram for PlatformerPro.CharacterInspector:

Public Member Functions

override void OnInspectorGUI ()
 Draw the inspector GUI. More...
 

Protected Member Functions

virtual void EnsureInitialised ()
 Ensures all the lists of colliders are non null. More...
 
virtual void DrawLayersFoldout ()
 Draws layer editors. More...
 
virtual void DrawSlopesFoldout ()
 Draws detail editors. More...
 
virtual void DrawLadderSettingsFoldout ()
 
virtual void DrawWallSettingsFoldout ()
 
virtual void DrawAvancedSettingsFoldout ()
 Draws detail editors. More...
 
virtual void DrawColliderEditor ()
 Draws the editor controls for editing colliders. More...
 
virtual void DrawDebugOptions ()
 Draws the debug options buttons. More...
 
virtual void DrawFeetGui ()
 Draws the GUI for editing feet. More...
 
virtual void ResetAllColliders ()
 Resets all colliders. More...
 
virtual void UpdateColliders ()
 Order and save colliders and set an undo point More...
 
virtual void DrawSidesGui ()
 Draws the GUI for editing sides. More...
 
virtual void DrawHeadGui ()
 Draws the GUI for editing head. More...
 
virtual void ShowEditFeet ()
 Show the scene view editor for editing feet. More...
 
virtual void ShowFeet ()
 Show the feet in the scene view (not editabe) More...
 
virtual void ShowEditSides ()
 Show the scene view editor for editing sides. More...
 
virtual void ShowSides ()
 Show the sides in the scene view (not editable). More...
 
virtual void ShowEditHead ()
 Show the scene view editor for editing head. More...
 
virtual void ShowHead ()
 Show the head colliders in scene view (not editable) More...
 
virtual BasicRaycast CreateDefaultCollider (RaycastType type, Vector2 position)
 Creates the default collider for the given type. More...
 
virtual void EnsureTwoFeetColliders ()
 Ensures there are at least two feet colliders. More...
 
virtual void EnsureTwoHeadColliders ()
 Ensures there are at least two head colliders. More...
 
virtual void EnsureFeetSpacing ()
 Ensures the feet colliders are evenly spaced. More...
 
virtual void EnsureSideColliders ()
 Ensures there are at least four side colliders and checks there positions relateive to head and feet. More...
 
virtual Vector3 DrawMoveHandle (BasicRaycast collider)
 Draws a move handle. More...
 
virtual bool DrawAddHandle (BasicRaycast a, BasicRaycast b)
 Draws a add handle. More...
 
virtual bool DrawRemoveHandle (BasicRaycast collider)
 Draws a remove handle. More...
 
virtual void DrawImmovableHandle (BasicRaycast collider)
 Draws a handle that shouldn't move. More...
 
virtual Rect GetBounds (RaycastType type)
 Gets the bounds. More...
 
virtual Rect GetSpriteBounds (RaycastType type)
 Gets the raw sprite bounds. More...
 
virtual Rect GetSmartSpriteBounds (RaycastType type)
 Gets the sprite bounds by trying to determine where transparent pixels lie. More...
 
virtual Rect GetColliderBounds (RaycastType type)
 Gets the bounds based on a child collider. More...
 
virtual Rect GetMeshBounds (RaycastType type)
 Gets the bounds based on a child mesh. More...
 
virtual void DrawDebugColliders ()
 Draws arrows showing collider direction, hit point, etc. More...
 
virtual void AddAnimationDebugger ()
 Draws the debug animations (which is just a console log at this stage) More...
 
virtual void RemoveAnimationDebugger ()
 Draws the debug animations (which is just a console log at this stage) More...
 
virtual void DrawDebugMovement ()
 Draws the debug movement. More...
 
virtual void DrawMajorWarnings (Character target)
 Draws error boxes for any serious misconfigurations. More...
 
virtual void ForceRepaint ()
 Forces the repaint. More...
 
virtual void DrawPrefixAndValue (string prefix, string value, string previous)
 Draws a row in the enemy debugger. More...
 

Protected Attributes

bool layersFoldOut
 Show layers foldout? More...
 
bool slopesFoldOut
 Show slopes foldout? More...
 
bool advancedFoldOut
 Show advanced details foldout? More...
 
bool colliderEditorFoldOut
 Show collider editor options foldout More...
 
bool editFeet
 Are we editing feet colliders? More...
 
bool editSides
 Are we editing side colliders? More...
 
bool editHead
 Are we editing head colliders? More...
 
bool showColliders
 Are we showing but not editing colliders? More...
 
bool smartFeet
 Should the character use the smart feet colliders? More...
 
BoundaryDetectionMode boundaryDetectionMode = BoundaryDetectionMode.NONE
 How should we detect boundaries? More...
 
bool isAboutToReset
 Has the user clicked a reset button? More...
 
AnimationState previousAnimationState = AnimationState.NONE
 Store previous animation state for use when debugging. More...
 
SerializedProperty layerMask
 
SerializedProperty geometryLayerMask
 
SerializedProperty passthroughLayerMask
 
SerializedProperty feetLookAhead
 
SerializedProperty groundedLookAhead
 
SerializedProperty snapToGroundOnSlopesOnly
 
SerializedProperty groundedLeeway
 
SerializedProperty sideLookAhead
 
SerializedProperty fallSpeedForIgnoreHeadCollisions
 
SerializedProperty terminalVelocity
 
SerializedProperty switchCollidersOnDirectionChange
 
SerializedProperty passthroughLeeway
 
SerializedProperty minFastFallPassthroughTime
 
SerializedProperty calculateSlopes
 
SerializedProperty upSlopeDeceleration
 
SerializedProperty downSlopeAcceleration
 
SerializedProperty rotateToSlopes
 
SerializedProperty maxSlopeRotation
 
SerializedProperty rotationSpeed
 
SerializedProperty sideAngle
 
SerializedProperty characterRotationType
 
SerializedProperty detectLaddersByTag
 
SerializedProperty ladderLayerOrTagName
 
SerializedProperty detectAllWalls
 
SerializedProperty detectWallsByTag
 
SerializedProperty wallLayerOrTagName
 
SerializedProperty input
 
List< BasicRaycastfeetColliders
 
List< BasicRaycastleftColliders
 
List< BasicRaycastrightColliders
 
List< BasicRaycastheadColliders
 

Static Protected Attributes

static int sceneViewInspectorId = -1
 
const float MinHeightOfSideRelativeToFeet = 0.05f
 Sides should always be at least this distance above the feet. More...
 
const float MinYDistancebetweenSideColliders = 0.2f
 Sides should always be a little separated. More...
 
static bool debugColliders
 Are we showing the collider debug gizmos. More...
 
static bool debugAnimations
 Are we sending animation states to the debug window. More...
 
static bool debugMovement
 Are we sending state information to the debug window. More...
 
static bool validateSettings = true
 Do we want to show cahracter validation. More...
 
static GUIStyle addButtonStyle
 The add button style. More...
 
static GUIStyle removeButtonStyle
 The remove button style. More...
 
static GUIStyle moveButtonStyle
 The move button style. More...
 
static Color handleColor = new Color(0.7f, 0.7f, 0.7f, 1.0f)
 The default color of the handles. More...
 
static Color mouseOverColor = new Color(0.7f, 0.9f, 1.0f, 1.0f)
 The color of the button handles. More...
 
static bool symmetrical
 Should colliders be evenly spaced around characters centre. More...
 
static string debugCurrentMovement
 Stores current movement for debugging More...
 
static string debugPreviousMovement
 Stores previous movement for debugging More...
 
static string debugCurrentMovementType
 Stores current movement type for debugging More...
 
static string debugPreviousMovementType
 Stores previous movement type for debugging More...
 

Detailed Description

Inspector for characters classes.

Member Function Documentation

◆ AddAnimationDebugger()

virtual void PlatformerPro.CharacterInspector.AddAnimationDebugger ( )
protectedvirtual

Draws the debug animations (which is just a console log at this stage)

◆ CreateDefaultCollider()

virtual BasicRaycast PlatformerPro.CharacterInspector.CreateDefaultCollider ( RaycastType  type,
Vector2  position 
)
protectedvirtual

Creates the default collider for the given type.

Returns
The default collider.
Parameters
typeType.
positionPosition of feet.

◆ DrawAddHandle()

virtual bool PlatformerPro.CharacterInspector.DrawAddHandle ( BasicRaycast  a,
BasicRaycast  b 
)
protectedvirtual

Draws a add handle.

Returns
True if the handle is clicked.
Parameters
aCollider to draw the handle from.
bCollider to draw the handle to.

◆ DrawAvancedSettingsFoldout()

virtual void PlatformerPro.CharacterInspector.DrawAvancedSettingsFoldout ( )
protectedvirtual

Draws detail editors.

◆ DrawColliderEditor()

virtual void PlatformerPro.CharacterInspector.DrawColliderEditor ( )
protectedvirtual

Draws the editor controls for editing colliders.

◆ DrawDebugColliders()

virtual void PlatformerPro.CharacterInspector.DrawDebugColliders ( )
protectedvirtual

Draws arrows showing collider direction, hit point, etc.

◆ DrawDebugMovement()

virtual void PlatformerPro.CharacterInspector.DrawDebugMovement ( )
protectedvirtual

Draws the debug movement.

◆ DrawDebugOptions()

virtual void PlatformerPro.CharacterInspector.DrawDebugOptions ( )
protectedvirtual

Draws the debug options buttons.

◆ DrawFeetGui()

virtual void PlatformerPro.CharacterInspector.DrawFeetGui ( )
protectedvirtual

Draws the GUI for editing feet.

◆ DrawHeadGui()

virtual void PlatformerPro.CharacterInspector.DrawHeadGui ( )
protectedvirtual

Draws the GUI for editing head.

◆ DrawImmovableHandle()

virtual void PlatformerPro.CharacterInspector.DrawImmovableHandle ( BasicRaycast  collider)
protectedvirtual

Draws a handle that shouldn't move.

Returns
The new location.
Parameters
colliderCollider to draw the handle for.

◆ DrawLadderSettingsFoldout()

virtual void PlatformerPro.CharacterInspector.DrawLadderSettingsFoldout ( )
protectedvirtual

◆ DrawLayersFoldout()

virtual void PlatformerPro.CharacterInspector.DrawLayersFoldout ( )
protectedvirtual

Draws layer editors.

◆ DrawMajorWarnings()

virtual void PlatformerPro.CharacterInspector.DrawMajorWarnings ( Character  target)
protectedvirtual

Draws error boxes for any serious misconfigurations.

◆ DrawMoveHandle()

virtual Vector3 PlatformerPro.CharacterInspector.DrawMoveHandle ( BasicRaycast  collider)
protectedvirtual

Draws a move handle.

Returns
The new location.
Parameters
colliderCollider to draw the handle for.

◆ DrawPrefixAndValue()

virtual void PlatformerPro.CharacterInspector.DrawPrefixAndValue ( string  prefix,
string  value,
string  previous 
)
protectedvirtual

Draws a row in the enemy debugger.

Parameters
prefixPrefix.
valueValue.
previousPrevious.

◆ DrawRemoveHandle()

virtual bool PlatformerPro.CharacterInspector.DrawRemoveHandle ( BasicRaycast  collider)
protectedvirtual

Draws a remove handle.

Returns
True if the handle is clicked.
Parameters
colliderCollider to draw the handle for.

◆ DrawSidesGui()

virtual void PlatformerPro.CharacterInspector.DrawSidesGui ( )
protectedvirtual

Draws the GUI for editing sides.

◆ DrawSlopesFoldout()

virtual void PlatformerPro.CharacterInspector.DrawSlopesFoldout ( )
protectedvirtual

Draws detail editors.

◆ DrawWallSettingsFoldout()

virtual void PlatformerPro.CharacterInspector.DrawWallSettingsFoldout ( )
protectedvirtual

◆ EnsureFeetSpacing()

virtual void PlatformerPro.CharacterInspector.EnsureFeetSpacing ( )
protectedvirtual

Ensures the feet colliders are evenly spaced.

◆ EnsureInitialised()

virtual void PlatformerPro.CharacterInspector.EnsureInitialised ( )
protectedvirtual

Ensures all the lists of colliders are non null.

◆ EnsureSideColliders()

virtual void PlatformerPro.CharacterInspector.EnsureSideColliders ( )
protectedvirtual

Ensures there are at least four side colliders and checks there positions relateive to head and feet.

◆ EnsureTwoFeetColliders()

virtual void PlatformerPro.CharacterInspector.EnsureTwoFeetColliders ( )
protectedvirtual

Ensures there are at least two feet colliders.

◆ EnsureTwoHeadColliders()

virtual void PlatformerPro.CharacterInspector.EnsureTwoHeadColliders ( )
protectedvirtual

Ensures there are at least two head colliders.

◆ ForceRepaint()

virtual void PlatformerPro.CharacterInspector.ForceRepaint ( )
protectedvirtual

Forces the repaint.

◆ GetBounds()

virtual Rect PlatformerPro.CharacterInspector.GetBounds ( RaycastType  type)
protectedvirtual

Gets the bounds.

Returns
The bounds as a rect in a space local to the character transform.

◆ GetColliderBounds()

virtual Rect PlatformerPro.CharacterInspector.GetColliderBounds ( RaycastType  type)
protectedvirtual

Gets the bounds based on a child collider.

Returns
The bounds.
Parameters
typeType of raycast to get bounds for.

◆ GetMeshBounds()

virtual Rect PlatformerPro.CharacterInspector.GetMeshBounds ( RaycastType  type)
protectedvirtual

Gets the bounds based on a child mesh.

Returns
The bounds.
Parameters
typeType of raycast to get bounds for.

◆ GetSmartSpriteBounds()

virtual Rect PlatformerPro.CharacterInspector.GetSmartSpriteBounds ( RaycastType  type)
protectedvirtual

Gets the sprite bounds by trying to determine where transparent pixels lie.

Returns
The sprite bounds.
Parameters
typeThe type will affect how the pixels are read.

◆ GetSpriteBounds()

virtual Rect PlatformerPro.CharacterInspector.GetSpriteBounds ( RaycastType  type)
protectedvirtual

Gets the raw sprite bounds.

Returns
The smart sprite bounds.
Parameters
typeType.

◆ OnInspectorGUI()

override void PlatformerPro.CharacterInspector.OnInspectorGUI ( )

Draw the inspector GUI.

◆ RemoveAnimationDebugger()

virtual void PlatformerPro.CharacterInspector.RemoveAnimationDebugger ( )
protectedvirtual

Draws the debug animations (which is just a console log at this stage)

◆ ResetAllColliders()

virtual void PlatformerPro.CharacterInspector.ResetAllColliders ( )
protectedvirtual

Resets all colliders.

◆ ShowEditFeet()

virtual void PlatformerPro.CharacterInspector.ShowEditFeet ( )
protectedvirtual

Show the scene view editor for editing feet.

◆ ShowEditHead()

virtual void PlatformerPro.CharacterInspector.ShowEditHead ( )
protectedvirtual

Show the scene view editor for editing head.

◆ ShowEditSides()

virtual void PlatformerPro.CharacterInspector.ShowEditSides ( )
protectedvirtual

Show the scene view editor for editing sides.

◆ ShowFeet()

virtual void PlatformerPro.CharacterInspector.ShowFeet ( )
protectedvirtual

Show the feet in the scene view (not editabe)

◆ ShowHead()

virtual void PlatformerPro.CharacterInspector.ShowHead ( )
protectedvirtual

Show the head colliders in scene view (not editable)

◆ ShowSides()

virtual void PlatformerPro.CharacterInspector.ShowSides ( )
protectedvirtual

Show the sides in the scene view (not editable).

◆ UpdateColliders()

virtual void PlatformerPro.CharacterInspector.UpdateColliders ( )
protectedvirtual

Order and save colliders and set an undo point

Member Data Documentation

◆ addButtonStyle

GUIStyle PlatformerPro.CharacterInspector.addButtonStyle
staticprotected

The add button style.

◆ advancedFoldOut

bool PlatformerPro.CharacterInspector.advancedFoldOut
protected

Show advanced details foldout?

◆ boundaryDetectionMode

BoundaryDetectionMode PlatformerPro.CharacterInspector.boundaryDetectionMode = BoundaryDetectionMode.NONE
protected

How should we detect boundaries?

◆ calculateSlopes

SerializedProperty PlatformerPro.CharacterInspector.calculateSlopes
protected

◆ characterRotationType

SerializedProperty PlatformerPro.CharacterInspector.characterRotationType
protected

◆ colliderEditorFoldOut

bool PlatformerPro.CharacterInspector.colliderEditorFoldOut
protected

Show collider editor options foldout

◆ debugAnimations

bool PlatformerPro.CharacterInspector.debugAnimations
staticprotected

Are we sending animation states to the debug window.

◆ debugColliders

bool PlatformerPro.CharacterInspector.debugColliders
staticprotected

Are we showing the collider debug gizmos.

◆ debugCurrentMovement

string PlatformerPro.CharacterInspector.debugCurrentMovement
staticprotected

Stores current movement for debugging

◆ debugCurrentMovementType

string PlatformerPro.CharacterInspector.debugCurrentMovementType
staticprotected

Stores current movement type for debugging

◆ debugMovement

bool PlatformerPro.CharacterInspector.debugMovement
staticprotected

Are we sending state information to the debug window.

◆ debugPreviousMovement

string PlatformerPro.CharacterInspector.debugPreviousMovement
staticprotected

Stores previous movement for debugging

◆ debugPreviousMovementType

string PlatformerPro.CharacterInspector.debugPreviousMovementType
staticprotected

Stores previous movement type for debugging

◆ detectAllWalls

SerializedProperty PlatformerPro.CharacterInspector.detectAllWalls
protected

◆ detectLaddersByTag

SerializedProperty PlatformerPro.CharacterInspector.detectLaddersByTag
protected

◆ detectWallsByTag

SerializedProperty PlatformerPro.CharacterInspector.detectWallsByTag
protected

◆ downSlopeAcceleration

SerializedProperty PlatformerPro.CharacterInspector.downSlopeAcceleration
protected

◆ editFeet

bool PlatformerPro.CharacterInspector.editFeet
protected

Are we editing feet colliders?

◆ editHead

bool PlatformerPro.CharacterInspector.editHead
protected

Are we editing head colliders?

◆ editSides

bool PlatformerPro.CharacterInspector.editSides
protected

Are we editing side colliders?

◆ fallSpeedForIgnoreHeadCollisions

SerializedProperty PlatformerPro.CharacterInspector.fallSpeedForIgnoreHeadCollisions
protected

◆ feetColliders

List<BasicRaycast> PlatformerPro.CharacterInspector.feetColliders
protected

◆ feetLookAhead

SerializedProperty PlatformerPro.CharacterInspector.feetLookAhead
protected

◆ geometryLayerMask

SerializedProperty PlatformerPro.CharacterInspector.geometryLayerMask
protected

◆ groundedLeeway

SerializedProperty PlatformerPro.CharacterInspector.groundedLeeway
protected

◆ groundedLookAhead

SerializedProperty PlatformerPro.CharacterInspector.groundedLookAhead
protected

◆ handleColor

Color PlatformerPro.CharacterInspector.handleColor = new Color(0.7f, 0.7f, 0.7f, 1.0f)
staticprotected

The default color of the handles.

◆ headColliders

List<BasicRaycast> PlatformerPro.CharacterInspector.headColliders
protected

◆ input

SerializedProperty PlatformerPro.CharacterInspector.input
protected

◆ isAboutToReset

bool PlatformerPro.CharacterInspector.isAboutToReset
protected

Has the user clicked a reset button?

◆ ladderLayerOrTagName

SerializedProperty PlatformerPro.CharacterInspector.ladderLayerOrTagName
protected

◆ layerMask

SerializedProperty PlatformerPro.CharacterInspector.layerMask
protected

◆ layersFoldOut

bool PlatformerPro.CharacterInspector.layersFoldOut
protected

Show layers foldout?

◆ leftColliders

List<BasicRaycast> PlatformerPro.CharacterInspector.leftColliders
protected

◆ maxSlopeRotation

SerializedProperty PlatformerPro.CharacterInspector.maxSlopeRotation
protected

◆ minFastFallPassthroughTime

SerializedProperty PlatformerPro.CharacterInspector.minFastFallPassthroughTime
protected

◆ MinHeightOfSideRelativeToFeet

const float PlatformerPro.CharacterInspector.MinHeightOfSideRelativeToFeet = 0.05f
staticprotected

Sides should always be at least this distance above the feet.

◆ MinYDistancebetweenSideColliders

const float PlatformerPro.CharacterInspector.MinYDistancebetweenSideColliders = 0.2f
staticprotected

Sides should always be a little separated.

◆ mouseOverColor

Color PlatformerPro.CharacterInspector.mouseOverColor = new Color(0.7f, 0.9f, 1.0f, 1.0f)
staticprotected

The color of the button handles.

◆ moveButtonStyle

GUIStyle PlatformerPro.CharacterInspector.moveButtonStyle
staticprotected

The move button style.

◆ passthroughLayerMask

SerializedProperty PlatformerPro.CharacterInspector.passthroughLayerMask
protected

◆ passthroughLeeway

SerializedProperty PlatformerPro.CharacterInspector.passthroughLeeway
protected

◆ previousAnimationState

AnimationState PlatformerPro.CharacterInspector.previousAnimationState = AnimationState.NONE
protected

Store previous animation state for use when debugging.

◆ removeButtonStyle

GUIStyle PlatformerPro.CharacterInspector.removeButtonStyle
staticprotected

The remove button style.

◆ rightColliders

List<BasicRaycast> PlatformerPro.CharacterInspector.rightColliders
protected

◆ rotateToSlopes

SerializedProperty PlatformerPro.CharacterInspector.rotateToSlopes
protected

◆ rotationSpeed

SerializedProperty PlatformerPro.CharacterInspector.rotationSpeed
protected

◆ sceneViewInspectorId

int PlatformerPro.CharacterInspector.sceneViewInspectorId = -1
staticprotected

◆ showColliders

bool PlatformerPro.CharacterInspector.showColliders
protected

Are we showing but not editing colliders?

◆ sideAngle

SerializedProperty PlatformerPro.CharacterInspector.sideAngle
protected

◆ sideLookAhead

SerializedProperty PlatformerPro.CharacterInspector.sideLookAhead
protected

◆ slopesFoldOut

bool PlatformerPro.CharacterInspector.slopesFoldOut
protected

Show slopes foldout?

◆ smartFeet

bool PlatformerPro.CharacterInspector.smartFeet
protected

Should the character use the smart feet colliders?

◆ snapToGroundOnSlopesOnly

SerializedProperty PlatformerPro.CharacterInspector.snapToGroundOnSlopesOnly
protected

◆ switchCollidersOnDirectionChange

SerializedProperty PlatformerPro.CharacterInspector.switchCollidersOnDirectionChange
protected

◆ symmetrical

bool PlatformerPro.CharacterInspector.symmetrical
staticprotected

Should colliders be evenly spaced around characters centre.

◆ terminalVelocity

SerializedProperty PlatformerPro.CharacterInspector.terminalVelocity
protected

◆ upSlopeDeceleration

SerializedProperty PlatformerPro.CharacterInspector.upSlopeDeceleration
protected

◆ validateSettings

bool PlatformerPro.CharacterInspector.validateSettings = true
staticprotected

Do we want to show cahracter validation.

◆ wallLayerOrTagName

SerializedProperty PlatformerPro.CharacterInspector.wallLayerOrTagName
protected

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