SetMeshMaterial
Category: Objects
/ Display
Since engine version: 5.1 OC
Description
Changes the material of the calling object's mesh at runtime.
Syntax
bool SetMeshMaterial(string material, int submesh);
Parameters
- material:
Name of the material to set. It needs to be loaded at engine startup, i.e. it needs to be defined in a *.material file being located in an object that was loaded.
- submesh:
[opt]
If the mesh is composed of multiple submeshes then this parameter can be used to specify the submesh whose material is to be changed.
Example
Clonk-Karl, 2010-04