Well this was extreme use case I doubt it will ever get higher than several thousand.
I need these objects to handle damage dealing.
Some objects just apply attribute change on final target.
Other object modify above. So you can have handful of blueprints with specific formulas/events for handling specific type of damage. For example, Fire, Spell, Physical, can be combined in any possible way, by just chaining modifier effects.
And finally there are effects that apply other effects. For example over time or in area.
I decided to do it this way, because it fairly easy to use in blueprint and flexible enough, to do not need to rely on constantly adding new functionality in C++.
Try to create a pool of thos objects, existing somewhere in the world, and whe nyou use them, instead of creating, just set their location, and initialize them, then when they should get destroyed, set the location back to somewhere far away and deinitialize them.
Thanks. Well It might have worked if not for the fact that these objects were realying on actor attributes, to set values in their own in real time. And once they are created, the values are set.
I know I can find object modify it, and after that just apply it to other actor. I had similiar solution worked out before, but it was really awkward to use.
In any case I solved my problem in whole different way. Instead of trying to figure out some odd generic solution, I just written the most heavy functionality to be game specific, and now it is just handful of static functions.
Hi I’m curious that if this kind of action causes memory fragmentation too.
Does anyone knows how Unreal handle memory allocation?
I haven’t study the source code but I guess UE is using some kind of pre-allocated memory pool, so there should not be any fragmentation issue, is it?