03-13-2023, 12:15 PM
What exception is thrown when you call Add method. If it is Null reference exception, then you need to make sure that the material that implements the IMultiMapMaterial will create the TextureMaps list in constructor - see MultiMapMaterial.cs:
Code:
/// <summary>
/// Constructor
/// </summary>
public MultiMapMaterial()
{
TextureMaps = new System.Collections.Generic.List<TextureMapInfo>();
HasTransparency = false;
Alpha = 1.0f;
AmbientColor = Color3.Black;
DiffuseColor = Color3.White; // This is a mask that is multiplied with diffuse texture color - by default render diffuse texture without any mask - using White diffuse color
SpecularColor = Color3.Black;
SpecularPower = 0.0f;
EmissiveColor = Color3.Black;
}
Andrej Benedik