Construct 3 icon

Construct 3

Documentation

Layer script interface

Ashley's avatar
Medal
Construct Team Founder
Published 10 Jun, 2019
128 words
<1 min

The ILayer script interface represents a layer on a layout.

Layer APIs

name

A read-only string of the layer name.

index

A read-only number with the zero-based index of the layer on its layout. The bottom layer has an index of 0, with the index increasing upwards in Z order.

layout

The ILayout interface representing the layout this layer belongs to.

isVisible

A boolean indicating if the layer is visible or not. When invisible, the layer skips drawing entirely.

opacity

The opacity of the layer, as a floating point number in the range [0, 1], where 0 is fully transparent and 1 is fully opaque. Note that changing the opacity to a value other than 1 will force the layer to render via its own texture.