#include <RootSpawnableInterface.h>
Public Types | |
using | OnRootSpawnableReadyEvent = AZ::Event< const AZ::Data::Asset< Spawnable > &, bool > |
Public Member Functions | |
AZ_RTTI (AzFramework::RootSpawnableDefinition, "{6F3698F4-005D-4F26-BE99-5DC2E21FAD38}") | |
virtual uint64_t | AssignRootSpawnable (AZ::Data::Asset< Spawnable > rootSpawnable)=0 |
virtual void | ReleaseRootSpawnable ()=0 |
virtual void | ProcessSpawnableQueue ()=0 |
virtual void | ProcessSpawnableQueueUntilEmpty ()=0 |
Interface to manage the root spawnable. All calls to this interface need to be made from the main thread and all events are called from the main thread.
|
pure virtual |
Sets the provided spawnable as the new root spawnable. If a root spawnable has already been assigned this will unload any entities spawned from it and replace it. The provided spawnable will become the new root and all entities in it will be instanced into the game entity context.
|
pure virtual |
Force processing all SpawnableEntitiesManager requests immediately This is useful when loading a different level while SpawnableEntitiesManager still has pending requests
|
pure virtual |
Force processing all SpawnableEntitiesManager requests immediately and keep reprocessing until the queue is empty This is useful when unloading and shutting down to ensure that all pending requests are cleared.
|
pure virtual |
Releases the root spawnable if one is set, resulting in all entities spawned from it to be deleted and the spawnable asset to be released. This call is automatically done when AssignRootSpawnable is called while a root spawnable is assigned.