So I am making a simple RTS type building system. I click on a menu, I get a building follow my mouse cursor until I click, at which point it is placed.
However, while it is being dragged i changed its material to be a different one (transparent red), in the end I simply set the material back to how it was by using a temp variable where i saved the material.
Now the problem is that the first few buildings i place are all OK, but the third one and so on gets weirded out. Sometimes they get much darker, sometimes they get wonky colors and start glowing. Things like that.
As you can see in the screenshot above. The first few are OK whenever click on Play and then it starts to get strange.
Here are a few screenshots on how I change the materials. All materials are basic ones that already exist in UE4.