Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Tools.MMAutoOrderInLayer Class Reference

Add this component to an object to have it pick a new order in layer on start, useful to have unique sorting layer numbers. More...

Inheritance diagram for MoreMountains.Tools.MMAutoOrderInLayer:

Public Attributes

int GlobalCounterIncrement = 5
 the number by which to increment each new object's order in layer
bool BasedOnParentOrder = false
 if this is true, the new order in layer value will be based on the highest order value found on a parent with a similar sorting layer
int ParentIncrement = 1
 if BasedOnParentOrder is true, the new value will be the parent's order value + this value
bool ApplyNewOrderToChildren = false
 if this is true, the new order value will be passed to all children with a similar sorting layer
int ChildrenIncrement = 0
 the value by which the new order value should be incremented to pass it to children

Protected Member Functions

virtual void Start ()
 On Start, we get our sprite renderer and determine the new order in layer.
virtual void Initialization ()
 Gets the sprite renderer component and stores it.
virtual void AutomateLayerOrder ()
 Picks a new order in layer based on the inspector's settings.

Protected Attributes

SpriteRenderer _spriteRenderer

Detailed Description

Add this component to an object to have it pick a new order in layer on start, useful to have unique sorting layer numbers.

Member Function Documentation

◆ AutomateLayerOrder()

virtual void MoreMountains.Tools.MMAutoOrderInLayer.AutomateLayerOrder ( )
protectedvirtual

Picks a new order in layer based on the inspector's settings.

◆ Initialization()

virtual void MoreMountains.Tools.MMAutoOrderInLayer.Initialization ( )
protectedvirtual

Gets the sprite renderer component and stores it.

◆ Start()

virtual void MoreMountains.Tools.MMAutoOrderInLayer.Start ( )
protectedvirtual

On Start, we get our sprite renderer and determine the new order in layer.

Member Data Documentation

◆ _spriteRenderer

SpriteRenderer MoreMountains.Tools.MMAutoOrderInLayer._spriteRenderer
protected

◆ ApplyNewOrderToChildren

bool MoreMountains.Tools.MMAutoOrderInLayer.ApplyNewOrderToChildren = false

if this is true, the new order value will be passed to all children with a similar sorting layer

◆ BasedOnParentOrder

bool MoreMountains.Tools.MMAutoOrderInLayer.BasedOnParentOrder = false

if this is true, the new order in layer value will be based on the highest order value found on a parent with a similar sorting layer

◆ ChildrenIncrement

int MoreMountains.Tools.MMAutoOrderInLayer.ChildrenIncrement = 0

the value by which the new order value should be incremented to pass it to children

◆ GlobalCounterIncrement

int MoreMountains.Tools.MMAutoOrderInLayer.GlobalCounterIncrement = 5

the number by which to increment each new object's order in layer

◆ ParentIncrement

int MoreMountains.Tools.MMAutoOrderInLayer.ParentIncrement = 1

if BasedOnParentOrder is true, the new value will be the parent's order value + this value


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