Open 3D Engine AzCore 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.
AZ::SystemTickEvents Class Referenceabstract

#include <TickBus.h>

Inherits AZ::EBusTraits.

Public Types

typedef AZStd::mutex EventQueueMutexType
 
- Public Types inherited from AZ::EBusTraits
using AllocatorType = AZ::Internal::EBusEnvironmentAllocator
 
using BusIdType = NullBusId
 
using BusIdOrderCompare = NullBusIdCompare
 
using BusHandlerOrderCompare = BusHandlerCompareDefault
 
using MutexType = NullMutex
 
using EventQueueMutexType = NullMutex
 
template<class Bus >
using ConnectionPolicy = EBusConnectionPolicy< Bus >
 
template<class Context >
using StoragePolicy = EBusEnvironmentStoragePolicy< Context >
 
template<class Bus >
using RouterPolicy = EBusRouterPolicy< Bus >
 
using EventProcessingPolicy = EBusEventProcessingPolicy
 
template<typename DispatchMutex , bool IsLocklessDispatch>
using DispatchLockGuard = AZStd::conditional_t< IsLocklessDispatch, AZ::Internal::NullLockGuard< DispatchMutex >, AZStd::scoped_lock< DispatchMutex > >
 
template<typename ContextMutex >
using ConnectLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 
template<typename ContextMutex >
using BindLockGuard = AZStd::scoped_lock< ContextMutex >
 
template<typename ContextMutex >
using CallstackTrackerLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 

Public Member Functions

virtual void OnSystemTick ()=0
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Multiple
 
static const bool EnableEventQueue = true
 
- Static Public Attributes inherited from AZ::EBusTraits
static constexpr EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Multiple
 
static constexpr EBusAddressPolicy AddressPolicy = EBusAddressPolicy::Single
 
static constexpr bool EnableEventQueue = false
 
static constexpr bool EventQueueingActiveByDefault = true
 
static constexpr bool EnableQueuedReferences = false
 
static constexpr bool LocklessDispatch = false
 

Additional Inherited Members

- Protected Member Functions inherited from AZ::EBusTraits
 ~EBusTraits ()=default
 

Detailed Description

Interface for AZ::SystemTickBus, which is the EBus that dispatches system tick events. System tick events are dispatched at some interval of a small number of milliseconds, even when the host application does not have focus. It can be be used for anything that needs to be serviced regularly, such as network or asset processor polling. Note that it does not necessarily occur at a consistent interval. In some tools, such as the Editor, OnSystemTick() can be called more often than the regular interval. If timing matters, use TickEvents::OnTick() instead.

Note
Do not add a mutex to SystemTickEvents. It is unnecessary and typically degrades performance.

Member Typedef Documentation

◆ EventQueueMutexType

Specifies the mutex that is used when adding and removing events from the event queue. This mutex is for the event queue, not SystemTickEvents. Do not add a mutex to SystemTickEvents.

Member Function Documentation

◆ OnSystemTick()

virtual void AZ::SystemTickEvents::OnSystemTick ( )
pure virtual

Signals that the application has issued a system tick.

Member Data Documentation

◆ EnableEventQueue

const bool AZ::SystemTickEvents::EnableEventQueue = true
static

Enables the event queue, which you can use to execute actions just before the OnSystemTick event.

◆ HandlerPolicy

const AZ::EBusHandlerPolicy AZ::SystemTickEvents::HandlerPolicy = EBusHandlerPolicy::Multiple
static

Overrides the default AZ::EBusTraits handler policy so that multiple handlers can connect to the bus. This bus has one address because it uses the default EBusTraits address policy.


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