Child actor's variables gets overriden by its parent

I have an issue where I set the struct values of my Sword actor. Later, when I try to get the struct variables through the class defaults by using a class reference, I always end up with the default values from the parent class instead of the values I set.

Interestingly, in another child Sword actor, the values remain as they should. The only difference is that in the first one, I do something else, so it’s not just a ‘data-only blueprint,’ and that’s why it doesn’t work.

I could use some help with this because I’m kind of stuck. I could think of other solutions, but this one works best for me.

Is the variable set to instance editable?

Yeah, absolutely

May be because your trying to access through class reference instead of actor object reference

I’m not sure how to solve this issue. Should I just spawn an actor of this class somewhere and then retrieve the information from it, or is there a better solution?

Are you trying to access the data without spawning an actor? If so I’d make a data table from the struct info and use that method to grab info without an actor

I had thought of that, but I wasn’t sure how efficient tables are in Unreal, and it didn’t seem too smooth.

I’ve had no issues with them, all my bases classes are built off tables, eg I have a base class for things like grunts, wild animals, mummys or any enemy that just chases you and does melee, the only variable the actor holds is a data table row handle…their mesh, animations, scale, abilities, name ect. Is assigned on spawn, or called in some other functionalities from a data table row, alot more efficient than having tons of different classes. Maybe try out this method it’s working pretty well in my project( a Diablo style top down rpg)

It surely can reduce memory usage but what about cpu?

It may add a little to CPU process but not much, and id argue the ease off access and diverse ability using this method outweigh the cost of cpu cost, the way I set it up is it’s all assigned on begin play so it’s only a few processes on actor spawn