Constructors
PrefabFile() Properties
| Name | Type | Description |
|---|---|---|
RootObject | JsonObject | Contains the original JSON read from File. |
ResourceVersion virtual | Int32 | |
ShowInMenu | Boolean | If true then we'll show this in the right click menu, so people can create it |
MenuPath | String | If ShowInMenu is true, this is the path in the menu for this prefab |
MenuIcon | String | Icon to show to the left of the option in the menu |
DontBreakAsTemplate | Boolean | If true then the prefab will not be broken when created as a template |
Methods
static PrefabFile Load(String path) Load a prefab by file path. Also handles mount:// paths
PrefabScene GetScene() Get the actual scene scene
String GetMetadata(String title, String defaultValue = null) Read metadata saved using a ISceneMetadata based component, such as SceneInformation