class Scene

Inherits: Resource

Saveable hierarchy of scene objects that can be instantiated into a SceneInstance.

Public

Constructors

Scene

Scene()

Methods

~Scene

~Scene() noexcept

Instantiate

SPtr<SceneInstance> Instantiate() const

Instantiates a scene by creating an instance of the scene object hierarchy.

AllowAsyncLoading

bool AllowAsyncLoading() const override

Returns whether or not this resource is allowed to be asynchronously loaded.

staticCreate

static HScene Create(const HSceneObject &sceneObject)

Creates a new scene from the provided scene object.

The provided scene object and all saveable children will be cloned as part of the scene.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

Returns an interface you can use to access class' Run Time Type Information.

Internal

Methods

GetRoot

HSceneObject GetRoot() const

Returns a reference to the internal scene hierarchy.

Returned hierarchy is not instantiated and cannot be interacted with in a manner you would with normal scene objects.

GetGameObjectCollection

SPtr<GameObjectCollection> GetGameObjectCollection() const

Returns the game object collection that owns all the game objects in the scene.

Instantiate

HSceneObject Instantiate(SPtr<SceneInstance> &inOutSceneInstance) const

Instantiates a scene by creating an instance of the scene's scene object hierarchy.

The new hierarchy be set as the provided scene instance's root.

inOutSceneInstance
Scene instance into which to instantiate the scene instance in. If null, new scene instance will be created and output through this parameter.

Returns: Instantiated clone of the scene's scene object hierarchy.

ReplaceInternalHierarchy

void ReplaceInternalHierarchy(const HSceneObject &sceneObject)

Replaces the contents of this scene with new contents from the provided object.

Private

Methods

staticCreateEmpty

static SPtr<Scene> CreateEmpty()

Creates an empty and uninitialized scene.

Fields

mRoot

HSceneObject mRoot

mUUID

UUID mUUID

mGameObjectCollection

SPtr<GameObjectCollection> mGameObjectCollection

Collection owning the internal hierarchy.