Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::RootSpawnableNotifications Class Reference

Notifications send when the root spawnable updates. Events will always be called from the main thread. More...

#include <RootSpawnableInterface.h>

Inherits AZ::EBusTraits.

Public Types

using MutexType = AZStd::recursive_mutex
 

Public Member Functions

virtual void OnRootSpawnableAssigned (AZ::Data::Asset< Spawnable > rootSpawnable, uint32_t generation)
 
virtual void OnRootSpawnableReady (AZ::Data::Asset< Spawnable > rootSpawnable, uint32_t generation)
 
virtual void OnRootSpawnableReleased (uint32_t generation)
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple
 
static const bool EnableEventQueue = true
 

Detailed Description

Notifications send when the root spawnable updates. Events will always be called from the main thread.

Member Function Documentation

◆ OnRootSpawnableAssigned()

virtual void AzFramework::RootSpawnableNotifications::OnRootSpawnableAssigned ( AZ::Data::Asset< Spawnable rootSpawnable,
uint32_t  generation 
)
inlinevirtual

Called when the root spawnable has been assigned a new value. This may be called several times without a call to release in between.

Note
: The callback is not queued but immediately called from a random thread. This is done because this callback is typically used before entities are spawned and if it's queued then the entities spawn before this callback is called.
Parameters
rootSpawnableThe new root spawnable that was assigned.
generationThe generation of the root spawnable. This will increment every time a new spawnable is assigned.

◆ OnRootSpawnableReady()

virtual void AzFramework::RootSpawnableNotifications::OnRootSpawnableReady ( AZ::Data::Asset< Spawnable rootSpawnable,
uint32_t  generation 
)
inlinevirtual

Called when the root spawnable has completed spawning of entities. This may be called several times without a call to release in between.

Note
: This callback is queued and will be called with a delay and from the main thread.
Parameters
rootSpawnableThe new root spawnable that was used to spawn entities from.
generationThe generation of the root spawnable. This will increment every time a new spawnable is assigned.

◆ OnRootSpawnableReleased()

virtual void AzFramework::RootSpawnableNotifications::OnRootSpawnableReleased ( uint32_t  generation)
inlinevirtual

Called when the root spawnable has Released. This will only be called if there's no root spawnable assigned to take the place of the original root spawnable. Note: This callback is queued and will be called with a delay and from the main thread.

Parameters
generationThe generation of the root spawnable that was released.

The documentation for this class was generated from the following file: