Table of Contents

Class LayerManager

Namespace
PAC.Layers
public class LayerManager : MonoBehaviour
Inheritance
LayerManager

Fields

layerTypeSprite

public Sprite layerTypeSprite

Field Value

Sprite

tileLayerTypeSprite

public Sprite tileLayerTypeSprite

Field Value

Sprite

Properties

selectedLayer

The last layer that was selected.

public Layer selectedLayer { get; }

Property Value

Layer

selectedLayerIndex

The index of the last layer that was selected.

public int selectedLayerIndex { get; }

Property Value

int

selectedLayerIndices

The indices of all selected layers, in increasing order.

public int[] selectedLayerIndices { get; }

Property Value

int[]

selectedLayers

The selected layers, in order (highest layer first etc).

public Layer[] selectedLayers { get; }

Property Value

Layer[]

Methods

AddLayer()

public void AddLayer()

AddLayer(Texture2D)

public void AddLayer(Texture2D texture)

Parameters

texture Texture2D

AddTileLayer()

public void AddTileLayer()

DuplicateSelectedLayers()

public void DuplicateSelectedLayers()

FlattenSelectedLayers()

public void FlattenSelectedLayers()

HideAllBut(Layer)

public void HideAllBut(Layer layer)

Parameters

layer Layer

MoveSelectedLayersDown()

public void MoveSelectedLayersDown()

MoveSelectedLayersUp()

public void MoveSelectedLayersUp()

OnFileSwitched()

public void OnFileSwitched()

OnLayersChanged()

public void OnLayersChanged()

RemoveSelectedLayers()

public void RemoveSelectedLayers()

SetLayerBlendMode(int, BlendMode)

public void SetLayerBlendMode(int layerIndex, BlendMode blendMode)

Parameters

layerIndex int
blendMode BlendMode

SetLayerName(int, string)

public void SetLayerName(int layerIndex, string layerName)

Parameters

layerIndex int
layerName string

SetLayerOpacity(int, float)

public void SetLayerOpacity(int layerIndex, float opacity)

Parameters

layerIndex int
opacity float

SubscribeToLayerChange(UnityAction)

public void SubscribeToLayerChange(UnityAction call)

Parameters

call UnityAction

SubscribeToVisibilityChange(UnityAction)

public void SubscribeToVisibilityChange(UnityAction call)

Parameters

call UnityAction

WorldYCoordOfLayerTile(int)

public float WorldYCoordOfLayerTile(int layerTileIndex)

Parameters

layerTileIndex int

Returns

float