Types and Properties Meta
Last Updated Time: 11/22/2023
When writing C++ classes, filling in appropriate types and properties Meta according to the specification allows you to control various aspects, such as whether properties can be edited in the Editor, how they interact with the Property Editor and with the serialization mechanism (whether they are stored, whether to skip serialization, etc.).
DECLARE_PROPERTY (bool, LModelComponent, IfOverrideTexPaths,
GetIfOverrideTexPaths, SetIfOverrideTexPaths, EditAnywhere,
EditorType = CheckBox, Category = Render);
DECLARE_PROPERTY(const char*, LModelComponent, OverrideTexPaths,
GetOverrideTexPaths, SetOverrideTexPaths, EditAnywhere,
EditorType = FileControl, Category = Render, FileFilter = Directory
EditCondition = IfOverrideTexPaths);
Properties
MetaKey | MetaValue | Definition | Note |
---|---|---|---|
EditAnywhere | Read-Write in the Editor. | If these two MetaKeys are not set, this property will not be visible to the Editor by default. | |
VisibleAnywhere | Read-only in the Editor (read-only controls to be implemented). Object properties are internally visible, and container properties indicate that the container itself cannot be modified. | ||
Category | Arbitrary English character. | Property categories. | Use "|" to separate parent and child categories. There should be no spaces before or after the separator, or in the name. |
EditorType | CheckBox | CheckBox control. | If the MetaKey is not set, it will automatically match based on the property type. boolean = CheckBox string, widestr=String int, int64, float, double=FloatEdit enum=ComboBox |
String | Text control. | ||
FloatEdit | Float numeric control. | ||
DegreesEdit | Edit radians in Angle mode. The Editor displays the Angle while the actual property of the object is radians. | ||
AssetEdit | Asset control (File control + Preview image). | ||
FileEdit | File control. | ||
ColorEdit | Color control. | ||
TextureEdit | Texture control. | ||
ComboBox | ComboBox control. | ||
ChordControl | Shortcut key control. | ||
BehaviorTree | Behavior tree control. | ||
VisibleMaskEdit | Visible mask control. | ||
SoundFileEdit | Sound file control. | ||
CustomProperty | Arbitrary English character. | Custom property control. | Use the specified type to build property nodes. |
FilePath | The file type control will determine this value and set the root path for the selection window. | Such as "Project", "Computer", "Resource". | |
FileFilter | The file type control will determine this value and correspond it to the enumeration file type. | Please refer to the FileFilterMap table for details. | |
ValueList | The ComboBox control will obtain this value, which can be any number or English character. "|" is a reserved character. | Represent each item in the drop-down menu. | Use "|" to separate values from each other. |
ValueListMethod | The ComboBox control will obtain this value, which can be any number or English character. | If there is no ValueList, the ValueListMethod will be used. It calls the function defined by method to obtain the drop-down menu items. | |
AdvancedDisplay | Property controls are displayed in the advanced category. | ||
Decimals | Decimal precision, which can be any non-negative integer. | ||
ClampMin | The minimum value allowed to be set. | ||
ClampMax | The maximum value allowed to be set. | ||
EditorGroup | Edit control group. | Arbitrary character. | |
EditorGroupIndex | Edit control group index. | Index starting from 0. | |
RelevantProperty | Relevant properties. | After setting this Meta, when this property is modified, the control of the revelant property will be automatically updated (rebuilding the revelant control). | Use "|" to seperate multiple properties. |
ReplicatedName | Arbitrary English character, with "|" as a reserved character. | Server corresponding property name. | |
OnReplicated | Arbitrary English character, with "|" as a reserved character. | Property value change callback function. | |
SubclassOf | Arbitrary English character, with "|" as a reserved character. | The LClass class to which the property value belongs. | |
ShowOnlyInnerProperties | Display the control corresponding to the object property to its parent class. | ||
InitialEdit | An initialization editable property which is only displayed on the feature page, corresponding to the entity Meta HasInitialEdit. | ||
Config | A configuration type property which is only displayed on the feature page, corresponding to the entity Meta Config. | ||
SkipSerialization | Skip serialization. | ||
Transient | Skip storing. | ||
DuplicateTransient | Skip duplication. | ||
NonPIEDuplicateTransient | Skip non-PIE duplication. | ||
VisibleCondition | Display condition. | This property is only displayed when the condition property value satisfies the expression. | |
EditCondition | Edit condition. | This property can only be edited when the condition property value satisfies the expression. | |
Order | Integer value. | Property sorting priority. The larger the value, the higher the sorting priority. | |
KindOfActor | A string which should correspond to the class name of a subclass of LActor. | List all Actors in a level that are annotated with the "KindOfActor" type, and add them to a ComboBox for user selection. | Property type must be PERSISTID. |
Loop | The property value cycles between the maximum and minimum values. | ||
HintText | String. | Text information used for property control prompts. | |
KindOfComponent | String, format: KindOfComponent = "LVoxelTerrainActor. LPlanetAtmosphereComponent" | The example means to list the LPlanetAtmosphereComponent components under Actors of type LVoxelTerrainActor in a level and add them to a ComboBox for user selection. | Property type must be PERSISTID. |
NetProperty | Network synchronization property. | After being marked, the property will be synchronized by the network Server. | |
NetPropertyAll | Network synchronization of all properties. | After being marked, all properties of the object will be synchronized by the network Server. | |
NetPropertyCondition | Network synchronization conditions. | The network synchronization conditions are divided into two modes: Private and Public. Public is the default condition, which will synchronize to all Clients, while Private will only synchronize to the Client of the master player. | |
NetPropertyNotify | Network synchronization property notification. | After the synchronization of Client property, a designated notification function will be triggered. | |
StoreProperty | Network store property. | After being marked, the properties will be stored by the Server. Currently, it is only limited to player objects. |
Note: No space is allowed while using “|” to split strings.
Entities
MetaKey | MetaValue | Definition | Note |
---|---|---|---|
EditorVisible | Visible or not in the Editor. | If the MetaKey is not set, the entity will not be visible to the Editor by default. | |
Category | Arbitrary English character, with "|" as a reserved character. | Property categories, using \"|" to split subcategories (to be implemented). | |
OnlyShowSelf | Display its own properties only. | Display its own properties instead of the ones inherited from the parent class. | |
TruncateParentProperty | Truncate parent properties here. | When encountering an object with this mark during property collection, the parent class properties will not be interrupted. | |
Prefabable | Whether it is a prefab base class. | If the MetaKey is not set, this type will not be visible when the Editor selects a base class for creating prefabs. | |
DisableMarqueeSelect | Whether to allow marquee selection. | If the MetaKey is set, the Editor will ignore objects of this type during marquee selection. | |
HideProperty,HideCategory | String. | Properties and categories to be hidden in this class (Suggestion: For Engine developers to use, project development uses hidden configuration files for implementation). | |
TranslationVisible | Whether the translation is visible. | If the MetaKey is not set, the Editor cannot edit the translation of this entity. | |
ServerClass | Server class. | The declared GameObject class corresponds to the class on the Server. | Used only in non-component Servers. |