I have a cube obj mesh with 6 material slots on it. I wanted to set this up as a die with variable faces, so I decided to use a mesh instance so each die could have a different set of faces. When I use mesh.surface_set_material though, it replaces that surface material on all instances of the mesh.
This post makes it sound like what I'm trying to do is impossible, but this one indicates that this feature has been implemented.

The console in this screenshot shows the values that the die should have on the top faces, but non of the dice even have the value "1", instead all showing faces 4, 5, 6, and 7; the values of the last die type applied (Lord) .
extends MeshInstance
# materials to apply, set in editor
export (Array, Material) var material_list
# order to apply numbers coming in for the math to match
var face_order = [2,1, 5, 3, 4, 0]
# die construct is an array of strings showing the symbol that the corresponding face should display.
func set_faces(die_construct):
for i in 6:
var face = face_order[i]
var value = die_construct[i+1]
var mat = material_list[0]
if value == "0":
mat = material_list[0]
elif value == "1":
mat = material_list[1]
elif value == "2":
mat = material_list[2]
elif value == "3":
mat = material_list[3]
# list shorted for brevity
elif value == "RR":
mat = material_list[ 10]
elif value == "Cut":
mat = material_list[ 11]
mesh.surface_set_material(face, mat)
Is what I'm trying to do even possible?
Edited for formatting.