get (): number | null Get the index of the current layer the object is assigned to.
Will always be null if the game doesn't use layers.
get (): string | null Get the name of the current layer the object is assigned to.
Will always be null if the game doesn't use layers.
set (name: string)
Set the name of the layer the object should be assigned to.
Throws an error if the game uses layers and the requested layer
wasn't defined.