# Sandbox.PrefabFile

A GameObject which is saved to a file.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.GameResource](/api/Sandbox.GameResource)

## Constructors

- [`PrefabFile`](/api/Sandbox.PrefabFile/.ctor)

## Properties

- [`DontBreakAsTemplate`](/api/Sandbox.PrefabFile/DontBreakAsTemplate): If true then the prefab will not be broken when created as a template
- [`MenuIcon`](/api/Sandbox.PrefabFile/MenuIcon): Icon to show to the left of the option in the menu
- [`MenuPath`](/api/Sandbox.PrefabFile/MenuPath): If ShowInMenu is true, this is the path in the menu for this prefab
- [`ResourceVersion`](/api/Sandbox.PrefabFile/ResourceVersion)
- [`RootObject`](/api/Sandbox.PrefabFile/RootObject): Contains the original JSON read from File.
- [`ShowInMenu`](/api/Sandbox.PrefabFile/ShowInMenu): If true then we'll show this in the right click menu, so people can create it

## Methods

- [`GetMetadata`](/api/Sandbox.PrefabFile/GetMetadata): Read metadata saved using a ISceneMetadata based component, such as SceneInformation
- [`GetScene`](/api/Sandbox.PrefabFile/GetScene): Get the actual scene scene
- [`Load`](/api/Sandbox.PrefabFile/Load): Load a prefab by file path. Also handles mount:// paths
