Class Scene

Scene class

A scene is a top-level object that contains the nodes, geometries, materials, textures, animation, poses, sub-scenes and etc. Scene can have sub-scenes, acts as multiple-document support in files like collada/blender/fbx Node hierarchy can be accessed through RootNodeLibrary is used to keep a reference of unattached objects during serialization(like meta data or custom objects) so it can be used as a library.

public class Scene : SceneObject

Constructors

NameDescription
Scene()Initializes a new instance of the Scene class.
Scene(Entity)Initializes a new instance of the Scene class with an entity attached to a new node.
Scene(Scene, string)Initializes a new instance of the Scene class as a sub-scene.

Properties

NameDescription
AnimationClips { get; }Gets all AnimationClip defined in the scene.
AssetInfo { get; set; }Gets or sets the top-level asset information
CurrentAnimationClip { get; set; }Gets or sets the active AnimationClip
Library { get; }Objects that not directly used in scene hierarchy can be defined in Library. This is useful when you’re using sub-scenes and put reusable components under sub-scenes.
virtual Name { get; set; }Gets or sets the name.(Inherited from A3DObject.)
Poses { get; }Gets all Pose used in this scene.
Properties { get; }Gets the collection of all properties.(Inherited from A3DObject.)
RootNode { get; }Gets the root node of the scene.
Scene { get; }Gets the scene that this object belongs to(Inherited from SceneObject.)
SubScenes { get; }Gets all sub-scenes

Methods

NameDescription
static FromFile(string)Opens the scene from given path
static FromFile(string, CancellationToken)Opens the scene from given path
static FromFile(string, FileFormat, CancellationToken)Opens the scene from given path using specified file format.
static FromFile(string, LoadOptions, CancellationToken)Opens the scene from given path using specified file format.
static FromStream(Stream, CancellationToken)Opens the scene from given stream
static FromStream(Stream, FileFormat, CancellationToken)Opens the scene from given stream using specified file format.
static FromStream(Stream, LoadOptions, CancellationToken)Opens the scene from given stream using specified IO config.
Clear()Clears the scene content and restores the default settings.
CreateAnimationClip(string)A shorthand function to create and register the AnimationClip The first AnimationClip will be assigned to the CurrentAnimationClip
FindProperty(string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)(Inherited from A3DObject.)
GetAnimationClip(string)Gets a named AnimationClip
GetProperty(string)Get the value of specified property(Inherited from A3DObject.)
Open(Stream)Opens the scene from given stream
Open(string)Opens the scene from given path
Open(Stream, CancellationToken)Opens the scene from given stream
Open(string, CancellationToken)Opens the scene from given path
Open(string, LoadOptions)Opens the scene from given path using specified file format.
Open(Stream, FileFormat, CancellationToken)Opens the scene from given stream using specified file format.
Open(Stream, LoadOptions, CancellationToken)Opens the scene from given stream using specified IO config.
Open(string, FileFormat, CancellationToken)Opens the scene from given path using specified file format.
Open(string, LoadOptions, CancellationToken)Opens the scene from given path using specified file format.
RemoveProperty(Property)Removes a dynamic property.(Inherited from A3DObject.)
RemoveProperty(string)Remove the specified property identified by name(Inherited from A3DObject.)
Render(Camera, string)Render the scene into external file from given camera’s perspective. The default output size is 1024x768 and output format is png
Render(Camera, TextureData)Render the scene into bitmap from given camera’s perspective.
Render(Camera, TextureData, ImageRenderOptions)Render the scene into bitmap from given camera’s perspective.
Render(Camera, string, Vector2, string)Render the scene into external file from given camera’s perspective.
Render(Camera, string, Vector2, string, ImageRenderOptions)Render the scene into external file from given camera’s perspective.
Save(string)Saves the scene to specified path using specified file format.
Save(Stream, FileFormat)Saves the scene to stream using specified file format.
Save(Stream, SaveOptions)Saves the scene to stream using specified file format.
Save(string, FileFormat)Saves the scene to specified path using specified file format.
Save(string, SaveOptions)Saves the scene to specified path using specified file format.
Save(Stream, FileFormat, CancellationToken)Saves the scene to stream using specified file format.
Save(Stream, SaveOptions, CancellationToken)Saves the scene to stream using specified file format.
Save(string, FileFormat, CancellationToken)Saves the scene to specified path using specified file format.
Save(string, SaveOptions, CancellationToken)Saves the scene to specified path using specified file format.
SetProperty(string, object)Sets the value of specified property(Inherited from A3DObject.)

See Also