TLDL; How do I apply a material to an entire actor and then undo this within the same second?
Alright, so I spent three days searching here and other sites, using Google, but nothing has shown up that applies to my situation. I could be mistaken, or maybe I’m using the wrong keywords.
Scenario: In the game, I am clicking a button, spawning the mesh of an actor (not the original actor) and placing it in the world. It can’t be the original actor because it’s basically not supposed to exist, in the eyes of the AI, until it has actually been placed. Once placed, the spawned mesh is destroyed and the actor is placed then activated.
Problem: While the object is overlapping other objects, I can lower its opacity, turn it all red by parsing through all mesh components, and make the dynamic material glow. The problem is, I need to be able to turn the entire actor’s material back to normal without creating and modifying a separate instance of it, and without storing every single material in a temporary array.
What I have tried: I first went about this by parsing through all of the actor’s primitives and changing the color to a solid red but that looked nasty and, again, there was no clean way to undo the change. I’ve tried creating a separate instance and making the original invisible for a while, but I honestly don’t like that idea for a number of reasons I won’t go into.
Also, it needs to be possible to manipulate the entire actor within blueprints without making any modifications to anything pertaining to the original actor. That is, without modifying its blueprint, material, mesh, etc. I’m trying to just be able to externally take an actor class reference, extract its mesh and spawn a generic actor using only the physical appearance of the original actor. Using the reference of the newly spawned actor, I need to be able to change its appearance and revert the changes back to its original appearance without constantly creating dynamic materials.