This is potentially not a bug, though I am reporting it because I struggled to spot this problem initially and I struggled to find documentation on it. A Remotely Owned actor may act inconsistently when it is being spawned from within a BeginPlay method.
Reproducible Example to showcase what I mean:
- Create a FirstPerson CPP Template project.
- On the projectile class add a particle emitter with some simple particle effect.
- In the CPP file Projectile.cpp create a spawnparam with bRemoteOwned enabled, and add it to the SpawnActor call(s) in the OnFire method, see provided image.
- Add an OnFire method call to the end of the BeginPlay function.
- Launch the game in editor. Notice how the first projectile spawns as expected and all subsequent SpawnProjectiles do not perform like the projectile created in the BeginPlay method.
When executing the spawn projectile from the BeginPlay function when the projectile is remotely owned it performs as it would with default ownership, when I would expect it to either behave the same as other calls outside the BeginPlay method (Stationary and with no particle effects) or to fail to spawn all together (with a warning in the logs).
If this is intended and the expected behaviour I apologise for the wasted time.
Kind regards,
Jakey113G