Class ComponentSchema
Defined in File ComponentSchema.h
Class Documentation
-
class ComponentSchema
A structural description of a component that can be interrogated at runtime (i.e.
to iterate over the properties) to facilitate registration and hydration (i.e. where a serialised representation is reconstructed into this structure).
Public Types
-
using TypeIdType = uint64_t
Public Functions
-
bool operator==(const ComponentSchema &Other) const
-
bool operator!=(const ComponentSchema &Other) const
Public Members
-
TypeIdType TypeId
A globally unique ID for identifiying this component type.
Will ultimately be serialized and used in messages sent over the multiplayer connection.
-
csp::common::String Name
A human-readable name describing this component (in
PascalCase).Must be unique across components registered with the engine. This name will be used for generating script bindings i.e. when named
Audio, a function with the namegetAudioComponentsis available on the entity in scripts.
-
csp::common::Array<ComponentProperty> Properties
The properties of this component.
Public Static Functions
-
static csp::common::String ToJson(const ComponentSchema &Schema)
-
static csp::common::Optional<ComponentSchema> FromJson(const csp::common::String &Json)
-
using TypeIdType = uint64_t