VisualPinball.Engine
VisualPinball.Engine copied to clipboard
Playfield elements lose material when changing parameters.
Playfield elements use any materials that have been assigned to them when they are regenerated by moving points (walls, ramps), moving the element (flippers/bumpers), or adjusting parameters (bumpers, flippers).
Elements should not regenerate materials if a new material has been applied.
This is a symptom of the fact we don't yet store the actual Unity material, but still its VP presentation. A quick fix would be to not set the material when regenerating the mesh, but at some point we need to start dealing with Unity-generated materials and store them accordingly.