Hi all, I'm currently having an extremely weird issue that only affects one of my meshes. When I try to use my shards with my Destruction plugin it causes it to turn white. After some preliminary debugging it appears that the duplication process of the material causes this. I have tried creating a new material, using different external materials and re-exporting from blender without success. If I use a different mesh in place of it however, it works fine. The materials also show normally when creating inherited scenes and in the importer. This is the duplication section, but I have a project linked below with the blend file as well for further testing.
// Gets the mesh instance and material for later use
MeshInstance3D meshInstance = GetNode<MeshInstance3D>("MeshInstance");
Material materialSurface = meshInstance.Mesh.SurfaceGetMaterial(0);
// Duplicates material, so tweens don't affect original object / other instances of it.
StandardMaterial3D material = materialSurface.Duplicate() as StandardMaterial3D;
//material.AlbedoColor = Colors.Red;
// Returns if no material is found
if (material == null)
{
GD.PrintErr("No material found, returning...");
return;
}
// Sets mesh material to be new material
meshInstance.MaterialOverride = material;
Full project: