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

Failed to Build

Open IndieDev99 opened this issue 2 years ago • 1 comments

return AZStd::make_pair<Multiplayer::PrefabEntityId, AZ::Transform>(

                    ^

O3DE/Projects/NewProject/Gem/Code/Source/Spawners/RoundRobinSpawner.cpp(45,13): note: You cannot bind an lvalue to an rvalue reference

          prefabEntityId, spawner->GetEntity()->GetTransform()->GetWorldTM());

          ^

C:\O3DE\23.10.0\Code\Framework\AzCore\AzCore/std/utils.h(291,20): note: see declaration of 'AZStd::make_pair'

  constexpr auto make_pair(T1&& value1, T2&& value2)

IndieDev99 avatar Dec 05 '23 12:12 IndieDev99

@IndieDev99, is this using the Multiplayer Template project? (I see the path is "NewProject" and not Multiplayer Sample). The RoundRobinSpawner isn't really needed anymore now that the Multiplayer gem (built into the engine), contains a Simple Network Player Spawner. You could actually just delete this code (and remove the .cpp/.h from the Gem/Code/newproject_files.cmake) and just the Simple Spawner.

AMZN-Gene avatar Feb 15 '24 17:02 AMZN-Gene

The new Multiplayer Template fixes this issue. Accessible here. Let me know if it does the trick, or reopen this issue :)

AMZN-Gene avatar Oct 03 '24 17:10 AMZN-Gene