#include <ScriptSystemBus.h>
Inherits AZ::EBusTraits.
Public Types | |
using | MutexType = AZStd::recursive_mutex |
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 ScriptContext * | AddContext (ScriptContext *context, int garbageCollectorStep)=0 |
virtual ScriptContext * | AddContextWithId (ScriptContextId id)=0 |
Add a context with an ID, the system will handle the ownership of the context (delete it when removed and the system deactivates) | |
virtual bool | RemoveContext (ScriptContext *context)=0 |
Removes a script context (without calling delete on it) | |
virtual bool | RemoveContextWithId (ScriptContextId id)=0 |
Removes and deletes a script context. | |
virtual ScriptContext * | GetContext (ScriptContextId id)=0 |
Returns the script context that has been registered with the app, if there is one. | |
virtual void | GarbageCollect ()=0 |
Full GC will be performed. | |
virtual void | GarbageCollectStep (int numberOfSteps)=0 |
Step GC. | |
virtual bool | Load (const Data::Asset< ScriptAsset > &asset, const char *mode, ScriptContextId id)=0 |
virtual ScriptLoadResult | LoadAndGetNativeContext (const Data::Asset< ScriptAsset > &asset, const char *mode, ScriptContextId id)=0 |
virtual void | ClearAssetReferences (Data::AssetId assetBaseId)=0 |
virtual void | RestoreDefaultRequireHook (ScriptContextId id)=0 |
virtual void | UseInMemoryRequireHook (const InMemoryScriptModules &modules, ScriptContextId id)=0 |
Static Public Attributes | |
static const AZ::EBusHandlerPolicy | HandlerPolicy = EBusHandlerPolicy::Single |
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 | |
Event for communication with the component main application. There can be only one application at a time. This is why this but is set to support only one client/listener.
|
pure virtual |
Add a context with based on user created context, the system will not delete such context.
garbageCollectorStep | you can pass -1 to use the internal system default step, otherwise you can use any value >=1 |
|
pure virtual |
Clear the script asset cached in ScriptSystemComponent.
|
pure virtual |
Load script asset into the a context. If the load succeeds, the script table will be on top of the stack
asset | script asset |
id | the id of the context to load the script in |