Class ComponentProperty
Defined in File ComponentProperty.h
Class Documentation
-
class ComponentProperty
Represents an individual data field, or “property”, within a component schema, consisting of a stable ID/key, a type kind and default value (via ReplicatedValue), and other metadata.
Public Types
-
using KeyType = uint16_t
Public Members
-
KeyType Key
An Id/Key for identifying this property within a component.
Need only be unique within the scope of the component (which is historically the case), but could also be globally unique. Will ultimately be serialized and used in messages sent over the multiplayer connection.
-
csp::common::String Name
A human-readable name describing this propery (in
camelCase).Must be unique within the component (two properties should not have the same name). This name will be used for generating script bindings i.e. a property with this name will be exposed on the component in scripts.
-
csp::common::ReplicatedValue DefaultValue
The default value of this property.
This also jointly declares the type of the property, which is considered static i.e. if the value is a
float, it can’t be later changed to hold aString.
-
using KeyType = uint16_t