Skip to content

File NetworkComponent.hpp

File List > Components > NetworkComponent.hpp

Go to the documentation of this file

#ifndef ENGINE_COMPONENTS_NETWORKCOMPONENT_HPP
#define ENGINE_COMPONENTS_NETWORKCOMPONENT_HPP

#include <cstdint>
#include <string>

namespace Engine {

struct NetworkComponent {
    std::uint64_t networkId = 0;
    // Using string for authority to simplify serialization/deserialization.
    // Valid values: "Server", "Client", "Shared"
    std::string authority = "Server";
    bool syncTransform = true;
    bool syncSprite = false;
    int snapshotPriority = 0;
    std::string prefabPath;
};

} // namespace Engine

#endif // ENGINE_COMPONENTS_NETWORKCOMPONENT_HPP