Download

Performance & SkeletalMesh in C++ at runtime

Greeting !

Simple performance ask :
On a multiplayer game, when the pawn is locally control, i use skeletalmesh for arms only.
I Try to add they manually by cpp at runtime but it’s an hell to configure position and settings for non programmers (and even for dev, it’s not suitable as you need to recompile everytime).

So i create them on the constructor, but for a proxy spawn it’s a performance cost, as you need to do operation on a useless skeletal mesh with blueprint animation who is not even visible,

How i can handle this ? Activate ? or a simple bVisible = false is enough ? remove them at runtime if we are not proxy ? What is the best practice in this case ?

Just set SkeletalMesh->bPauseAnims, which will stop the Anim BP from ticking. I’d honestly only worry about this if I got the game to a point where it’s actually showing up in profiling that we’re spending a lot of time in AnimBPs for no reason.