o3de / o3de-multiplayersample

Multiplayer sample project for the Open 3D Engine
https://o3de.org
Other
84 stars 61 forks source link

Failed to Build #473

Closed IndieDev99 closed 1 month ago

IndieDev99 commented 11 months ago

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)
AMZN-Gene commented 9 months ago

@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 commented 1 month ago

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