 |
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.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntaxpublic 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