How do I prevent non-visible member variables from being reset to the CDO defaults?

Hey everyone!

I have a component which I’m using to add clothing to a character’s material. It uses a few TSubclassOf variables where I assign the equipment the character should wear, which is then assigned to a private member variable so that I can unequip it later.

However, whenever I try to switch between armors, the CDO has already nulled out the private variables, and I can’t access certain texture and model data I need to use to remove the clothing properly from the model and its material.

Is there a way of preventing the CDO from resetting certain variables, or another way of doing this?

EDIT: After a bit of testing, I’ve found that it works fine in-game, but not in.editor.