Execution blocks because you have an empty array. When assigning a material to a component, you must add the item to the array. You should set the material through the event ApplyMaterialWithUndo. It looks like you set material somewhere else.
1 Like