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.
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.
Member Name | Summary |
---|---|
GetMetadata | Retrieves metadata associated with the prefab, using a specified title and default value. |
RootObject | Gets the root JSON object of the prefab file. |
ShowInMenu | If true, the prefab will be displayed in the right-click menu for creation. |
MenuPath | Specifies the path in the menu where this prefab will appear, if ShowInMenu is true. |
MenuIcon | Defines the icon displayed next to the prefab option in the menu. |
DontBreakAsTemplate | If true, the prefab will not be broken when created as a template. |
ResourceVersion | Gets the version of the resource. |