SceneFileclass

A scene file contains a collection of GameObject with Components and their properties.

objectGameResourceSceneFile
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.SceneFile : Sandbox.GameResource

Constructors1

Showing 1 constructors

Methods3

Showing 3 methods

protected virtual Sandbox.Bitmap CreateAssetTypeIcon(int width, int height)PROTECTEDVIRTUAL

ParameterTypeDescription
widthint
heightint
Returns:Bitmap

public string GetMetadata(string title, string defaultValue = null)PUBLIC

ParameterTypeDescription
titlestring
defaultValue = nullstring
Returns:string

public static Sandbox.SceneFile Load(string path)PUBLICSTATIC

Load a scene by file path. Also handles mount:// paths.

ParameterTypeDescription
pathstring
Returns:SceneFile

Properties8

Showing 8 properties

protected virtual object Sandbox.SceneFile.ActionGraphTarget { get; set; }PROTECTEDVIRTUALGETSET

Returns:object

protected virtual System.Type Sandbox.SceneFile.ActionGraphTargetType { get; set; }PROTECTEDVIRTUALGETSET

Returns:Type

public string Sandbox.SceneFile.Description { get; set; }PUBLICGETSETOBSOLETE

Obsolete: Use GetMetadata

Returns:string

public System.Text.Json.Nodes.JsonObject[] Sandbox.SceneFile.GameObjects { get; set; }PUBLICGETSET

Returns:JsonObject[]

public System.Guid Sandbox.SceneFile.Id { get; set; }PUBLICGETSET

Returns:Guid

public virtual int Sandbox.SceneFile.ResourceVersion { get; set; }PUBLICVIRTUALGETSET

Returns:int

public System.Text.Json.Nodes.JsonObject Sandbox.SceneFile.SceneProperties { get; set; }PUBLICGETSET

Returns:JsonObject

public string Sandbox.SceneFile.Title { get; set; }PUBLICGETSETOBSOLETE

Obsolete: Use GetMetadata

Returns:string

On this page