Terrain - stingray.Terrain object reference - Stingray Lua API Reference

stingray.Terrain object reference

Description

Represents a terrain.

Functions

Parameters

self :

stingray.Terrain

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

ID :

any(integer, string)

The index or name of the material to be retrieved.

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

stingray.Material

The retrieved material.

Parameters

self :

stingray.Terrain

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

integer

The total number of materials in the terrain.

Parameters

self :

stingray.Terrain

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

flag :

string

The name of the shader pass flag to set.

enabled :

boolean

Use true to enable the shader pass, or false to disable.

Returns
This function does not return any values.