Spawn skeletal mesh server side and replicated

Hi !
I’ve created an Actor that spawn an other actor (Blueprint) server side,
GetWorld()->SpawnActor(ObjectClass, GetActorLocation(), FRotator::ZeroRotator, Params);
But after doing profiling, i noticed that spawning my actor was using ±50ms when spawned and replicated

The server seems to take 25ms to spawn the object and 25ms to serialize the skeletal mesh.
My guess was that if the server serialize the skeletal mesh it’s because it is sent to the client.
Is there a way to spawn my actor without the skeletal mesh, and then replicated it so that the client receive it
Or on other good practice for spawning an Actor without graphical elements on the server, but to have them on the client (Because they have the blueprint too)
I need to spawn it on the server, because this actor can move and can be destroyed

Thanks !

Is the asset loaded before spawning? 25ms seems too high. Also, when you say SkeletalMesh, do you mean a Pawn?

Just an AActor with desctructible stuff, i use the bone to spawn emitters on it
I didn’t do anything special to load it before, should i load at least one in the world to speed up the process ?

Definitely. If it has to go to disk for the asset, I am surprised it’s that cheap :slight_smile:

Is it possible to preload certains asset to minimize the loading time ?

There are multiple ways to get an asset loaded. You can explicitly load one via LoadObject() API. Any asset referenced directly will be loaded when the referencer is loaded. Lastly, you can async load assets. Here’re are some links:

Async Load

Via reference