CreateMaterial()

Syntax

Result = CreateMaterial(#Material, TextureID)
Description
Creates a new #Material based on the specified texture. A valid 'TextureID' can be easily obtained with the TextureID() command. If the 'Result' is 0, the Material creation has failed. If the #Material was already created, it is automatically freed and replaced by the new one.

Supported OS

Windows, Linux

<- CountMaterialLayers() - Material Index - DisableMaterialLighting() ->