4#include <nlohmann/json.hpp>
30 const nlohmann::json &data) {
32 networkEntity.
id = data.value(
"id", 0u);
33 networkEntity.archetypeId =
34 data.value(
"archetypeId",
static_cast<std::uint16_t
>(0));
void networkEntityFromJson(rtk::ecs::Registry ®, std::size_t entity, const nlohmann::json &data)
Adds a NetworkEntity to an entity from its blueprint data.
Definition NetworkEntity.hpp:29
Links a local entity to its replicated counterpart.
Definition NetworkEntity.hpp:18
std::uint16_t archetypeId
Archetype id of the entity blueprint.
Definition NetworkEntity.hpp:20
std::uint32_t id
Network id assigned by the server.
Definition NetworkEntity.hpp:19