class PrefabFile : GameResource

book_4_sparkGenerated
code_blocksInput

Description

The PrefabFile class in the Sandbox namespace represents a prefab resource within the s&box game engine. It extends the GameResource class, providing additional functionality specific to prefabs, such as metadata management and menu integration.

Members

Instance Members

Member NameSummary
GetMetadataRetrieves metadata associated with the prefab, using a specified title and default value.
RootObjectGets the root JSON object of the prefab file.
ShowInMenuIf true, the prefab will be displayed in the right-click menu for creation.
MenuPathSpecifies the path in the menu where this prefab will appear, if ShowInMenu is true.
MenuIconDefines the icon displayed next to the prefab option in the menu.
DontBreakAsTemplateIf true, the prefab will not be broken when created as a template.
ResourceVersionGets the version of the resource.