Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------------------------
//! Container for storing a collection of prefab variants
[BaseContainerProps(configRoot: true)]
class ACE_PrefabVariantsConfig
{
[Attribute(desc: "Collection of prefab variants.", params: "et", uiwidget: UIWidgets.ResourcePickerThumbnail)]
protected ref array<ResourceName> m_aVariants;

//------------------------------------------------------------------------------------------------
array<ResourceName> GetVariants()
{
return m_aVariants;
}

//------------------------------------------------------------------------------------------------
ResourceName GetRandomVariant()
{
if (m_aVariants.IsEmpty())
return "";

return m_aVariants.GetRandomElement();
}
}
Binary file not shown.
Loading
Loading