StaticModel components for which I need to change the material frequently. However, it seems consistent that the third time I attempt to set the material, I get the exception. I've tried it two ways:
node.GetComponent<StaticModel>( 0 ).SetMaterial( material );
node.RemoveAllComponents(); var component = node.CreateComponent<StaticModel>( CreateMode.Local ); component.Model = CoreAssets.Models.Sphere; component.SetMaterial( material );
Same exception both ways. I have only tested it in UWP project.