SetLayerMaterial
bool SetLayerMaterial(this CompoundStructure cs, int layerIndex, Material material)Sets the material of a specific layer (remember to reassign the compound structure back to the type).
Parameters
- csCompoundStructure
The compound structure.
- layerIndexint
The layer index.
- materialMaterial
The material to assign.
Returns: True if successful; otherwise false.
Example
bool ok = cs.SetLayerMaterial(1, newMat);