List Properties
Overview
List properties in MetaForge are automatically applied to TArray
types. The metadata should specify the drawer for the underlying type to ensure that each item in the list is displayed correctly in the editor. By utilizing list properties, developers can create rich data structures that provide flexibility and scalability for their projects.
Defining List Properties
To define a list property in MetaForge, you use TArray
types. The metadata should specify the drawer for the underlying type, allowing the editor to provide the correct interface for adding, removing, and editing individual items.
Property Drawers for List Properties
List properties in MetaForge support any of the available property drawers, allowing for flexible configuration of list items in the Unreal Engine editor. However, nested lists (e.g., TArray<TArray<...>>
) are not supported. The metadata specifies the drawer for the underlying type, ensuring that the correct interface is provided for each item:
Example Usage of Property Drawers
In this example, SNameProperty
is used to manage a list of FName
values, and the property is marked as Instanced
to ensure proper instantiation and management of the list items. This ensures that each item in the list is displayed correctly in the editor.
Summary
List properties in MetaForge provide an effective way to manage collections of data within your Unreal Engine project. Whether you need simple lists, unique sets, or key-value mappings, list properties allow you to create dynamic and easily editable data structures that integrate seamlessly with the Unreal Engine editor.
Last updated