|
void | Activate () override |
|
void | Deactivate () override |
|
ScriptContext * | AddContext (ScriptContext *context, int garbageCollectorStep=-1) override |
|
ScriptContext * | AddContextWithId (ScriptContextId id) override |
| Add a context with an ID, the system will handle the ownership of the context (delete it when removed and the system deactivates)
|
|
bool | RemoveContext (ScriptContext *context) override |
| Removes a script context (without calling delete on it)
|
|
bool | RemoveContextWithId (ScriptContextId id) override |
| Removes and deletes a script context.
|
|
ScriptContext * | GetContext (ScriptContextId id=ScriptContextIds::DefaultScriptContextId) override |
| Returns the script context that has been registered with the app, if there is one.
|
|
void | GarbageCollect () override |
|
void | GarbageCollectStep (int numberOfSteps) override |
|
bool | Load (const Data::Asset< ScriptAsset > &asset, const char *mode, ScriptContextId id) override |
|
ScriptLoadResult | LoadAndGetNativeContext (const Data::Asset< ScriptAsset > &asset, const char *mode, ScriptContextId id) override |
|
void | ClearAssetReferences (Data::AssetId assetBaseId) override |
|
void | RestoreDefaultRequireHook (ScriptContextId id=ScriptContextIds::DefaultScriptContextId) override |
|
void | UseInMemoryRequireHook (const InMemoryScriptModules &modules, ScriptContextId id=ScriptContextIds::DefaultScriptContextId) override |
|
void | OnSystemTick () override |
|
Data::AssetPtr | CreateAsset (const Data::AssetId &id, const Data::AssetType &type) override |
| Called by the asset database to create a new asset. No loading should during this call.
|
|
Data::AssetHandler::LoadResult | LoadAssetData (const Data::Asset< Data::AssetData > &asset, AZStd::shared_ptr< Data::AssetDataStream > stream, const AZ::Data::AssetFilterCB &assetLoadFilterCB) override |
| Called by the asset database to perform actual asset load.
|
|
void | DestroyAsset (Data::AssetPtr ptr) override |
| Called by the asset database when an asset should be deleted.
|
|
void | GetHandledAssetTypes (AZStd::vector< Data::AssetType > &assetTypes) override |
| Return handled asset types.
|
|
AZ::Data::AssetType | GetAssetType () const override |
|
const char * | GetAssetTypeDisplayName () const override |
|
const char * | GetGroup () const override |
|
const char * | GetBrowserIcon () const override |
|
AZ::Uuid | GetComponentTypeId () const override |
|
void | GetAssetTypeExtensions (AZStd::vector< AZStd::string > &extensions) override |
|
bool | CanCreateComponent (const AZ::Data::AssetId &assetId) const override |
|
void | OnAssetReloaded (Data::Asset< Data::AssetData > asset) override |
| Called before an asset reload has started.
|
|
void | LoadReadyAsset (Data::Asset< Data::AssetData > asset) |
|
ContextContainer * | GetContextContainer (ScriptContextId id) |
|
int | DefaultRequireHook (lua_State *l, ScriptContext *context, const char *module) |
|
int | InMemoryRequireHook (lua_State *l, ScriptContext *context, const char *module) |
|
virtual void | Init () |
|
virtual void | Activate ()=0 |
|
virtual void | Deactivate ()=0 |
|
virtual bool | ReadInConfig (const ComponentConfig *baseConfig) |
|
virtual bool | WriteOutConfig (ComponentConfig *outBaseConfig) const |
|
virtual void | SetEntity (Entity *entity) |
|
virtual void | OnAfterEntitySet () |
| Function to call after setting the entity in this component.
|
|
virtual LoadResult | LoadAssetData (const Asset< AssetData > &asset, AZStd::shared_ptr< AssetDataStream > stream, const AZ::Data::AssetFilterCB &assetLoadFilterCB)=0 |
|
|
Public Types inherited from AZ::Data::AssetHandler |
enum class | LoadResult : u8 { Error
, MoreDataRequired
, LoadComplete
} |
| Result from LoadAssetData - it either finished loading, didn't finish and is waiting for more data, or had an error.
|
|
| AZ_TYPE_INFO_WITH_NAME_DECL (Component) |
|
| AZ_RTTI_NO_TYPE_INFO_DECL () |
|
| Component () |
|
virtual | ~Component () |
|
Entity * | GetEntity () const |
|
EntityId | GetEntityId () const |
|
NamedEntityId | GetNamedEntityId () const |
|
ComponentId | GetId () const |
|
virtual TypeId | GetUnderlyingComponentType () const |
|
void | SetId (const ComponentId &id) |
|
virtual void | SetSerializedIdentifier (AZStd::string serializedIdentifer) |
|
virtual AZStd::string | GetSerializedIdentifier () const |
|
virtual ComponentValidationResult | ValidateComponentRequirements (const ImmutableEntityVector &, const AZStd::unordered_set< AZ::Crc32 > &) const |
|
bool | SetConfiguration (const AZ::ComponentConfig &config) |
|
bool | GetConfiguration (AZ::ComponentConfig &outConfig) const |
|
Public Member Functions inherited from AZ::Data::AssetHandler |
| AZ_RTTI (AssetHandler, "{58BD1FDF-E668-42E5-9091-16F46022F551}") |
|
virtual AssetPtr | CreateAsset (const AssetId &id, const AssetType &type)=0 |
|
LoadResult | LoadAssetDataFromStream (const Asset< AssetData > &asset, AZStd::shared_ptr< AssetDataStream > stream, const AZ::Data::AssetFilterCB &assetLoadFilterCB) |
|
virtual bool | SaveAssetData (const Asset< AssetData > &asset, IO::GenericStream *stream) |
|
virtual AZ::Data::AssetId | AssetMissingInCatalog (const Asset< AssetData > &) |
|
virtual void | InitAsset (const Asset< AssetData > &asset, bool loadStageSucceeded, bool isReload) |
|
virtual void | DestroyAsset (AssetPtr ptr)=0 |
|
virtual void | GetHandledAssetTypes (AZStd::vector< AssetType > &assetTypes)=0 |
|
virtual bool | CanHandleAsset (const AssetId &) const |
|
virtual void | GetCustomAssetStreamInfoForLoad (AssetStreamInfo &streamInfo) |
|
virtual IO::IStreamerTypes::RequestMemoryAllocator * | GetAssetBufferAllocator () |
| Asset Handlers have the ability to provide custom asset buffer allocators for any non-standard allocation needs.
|
|
virtual void | GetDefaultAssetLoadPriority (AssetType type, IO::IStreamerTypes::Deadline &defaultDeadline, AZ::IO::IStreamerTypes::Priority &defaultPriority) const |
|
Script system component. It will manage all script contexts and provide script asset handler. You must have one of this components on you system entity (or any) to enable script support using the Hex facility. You are NOT REQUIRED to use it. You can use ScriptContext directly and manage it anyway you like, but you will be provide ScriptAsset management too.
void AZ::ScriptSystemComponent::Deactivate |
( |
| ) |
|
|
overrideprotectedvirtual |
Deactivates the component. The system calls this function when the owning entity is being deactivated. You must override this function. As a best practice, ensure that this function returns the component to a minimal footprint. The order of deactivation is the reverse of activation, so your component is deactivated before the components it depends on.
The system always calls the component's Deactivate() function before destroying the component. However, deactivation is not always followed by the destruction of the component. An entity and its components can be deactivated and reactivated without being destroyed. Ensure that your Deactivate() implementation can handle this scenario.
Implements AZ::Component.