o3de-extras icon indicating copy to clipboard operation
o3de-extras copied to clipboard

Refactor Multiplayer Template spawner

Open jhanca-robotecai opened this issue 9 months ago • 0 comments

Ideally RoundRobinSpawner.h/cpp and Source/Spawners/IPlayerSpawner.h is deleted entirely, and removed from the cmake file list: https://github.com/o3de/o3de-extras/blob/development/Templates/Multiplayer/Template/Gem/Code/%24%7BNameLower%7D_files.cmake

Remove game code references to RoundRobinSpawner and IPlayerSpawner as well (I think there's references inside the Source/${Name}SystemComponent.cpp

RoundRobinSpawner is replaced by the built-in Multiplayer gem component called SimplePlayerSpawner. https://www.docs.o3de.org/docs/user-guide/components/reference/multiplayer/simple-player-spawner/

You'd slap that component to the root level entity (whichever levels Multiplayer template ships with). The component takes the network prefab to spawn, and the player spawn points.

Originally posted by @AMZN-Gene in https://github.com/o3de/o3de-extras/pull/680#discussion_r1575329477

jhanca-robotecai avatar May 07 '24 11:05 jhanca-robotecai