Scene

Summary

Scene object that contains all actors and lifecycle.

Remarks

Danger

All calls made within this class MUST be performed on the Master Thread. See on how to safely call this from an asynchronous thread. Failure to comply with this can cause catastrophical failures as the engine is not designed for this.

Definition

Namespace: SDT4.Managed.Core
Assembly: SDT4.Managed.Core.dll

class Scene
Inheritance:

ObjectScene

Implements:

IDisposable

Fields

Name Type Description

Properties

Name Type Description

Methods

public T AsScript<T>()

Summary

Gets the instance of this class.

Returns:


public Void Reparent(Actor newParent, Actor child)

Parameters:


public Actor CreateEmptyActor(String? name, Boolean isStationary)

Parameters:

Returns:


public Actor CreatePrefabActor(IPrefabAsset prefab, String? name, Boolean isStationary, Object? payload)

Summary

Creates an actor from a prefab asset. This will instantiate a new instance of actors from the prefab chain, and optionally initialise a script if the prefab has one.

Parameters:

Returns:


public Actor GetActorFromId(UInt64 id)

Parameters:

Returns:


public Actor GetActorFromGuid(Guid guid)

Parameters:

Returns:


public Actor[] GetActorsWithName(String name)

Parameters:

Returns:


public IEnumerable<TScript> EnumerateActorsOfScript<TScript>(Boolean canBeDerived)

Parameters:

Returns:


public IEnumerable<Actor> EnumerateActorsWithComponent<TComponent>(TComponent component)

Parameters:

Returns:


public Void RemoveActor(Actor actor)

Parameters:


protected virtual Void Dispose(Boolean disposing)

Parameters:


protected virtual Void Finalize()


public Void Dispose()

Summary

Releases all scene resources and destroys all actors.