class PrefabFile : GameResource

robot_2Generated
code_blocksInput

Description

The PrefabFile class in the Sandbox namespace is a type of GameResource that represents a prefab resource in the game. It is used to define and manage prefabs, which are reusable game object templates. This class provides properties to control how the prefab appears in menus and how it behaves when used as a template.

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 shown 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 to display next to the prefab option in the menu.
DontBreakAsTemplateIf true, the prefab will not be broken when used as a template.
ResourceVersionGets the version of the resource.