Click or drag to resize
Ab4d.SharpEngine logo

ModelUtilsReplaceMaterial Method

Goes through all models and replaces the materialToFind with newMaterial. When isBackMaterial is set to true, BackMaterial is replaced instead of Material.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.0.9208+3b2441d6a11f923f2600f40f4296bdc3d8b46035
Syntax
C#
public static void ReplaceMaterial(
	SceneNode? sceneNode,
	Material materialToFind,
	Material newMaterial,
	bool isBackMaterial = false
)

Parameters

sceneNode  SceneNode
ModelNode or GroupNode
materialToFind  Material
Material that will be replaced by newMaterial
newMaterial  Material
Material that will be used instead of materialToFind
isBackMaterial  Boolean  (Optional)
if true then BackMaterial is replaced instead of Material
See Also