ISDKObjectTypeBase addon SDK interface
The ISDKObjectTypeBase
is used in the runtime as a base class for object types in the addon SDK. It derives from IObjectClass.
ISDKObjectTypeBase APIs
- _onCreate()
- An optional override called when the runtime starts up and creates all object types before the project starts. This call may be delayed when using a loader layout.
- getImageInfo()
- For plugins that use an image (by calling
this._info.SetHasImage(true)
in the editor plugin code), returns an IImageInfo representing the object's image.
- async _loadTextures(renderer)
- Optional override called by the runtime when it wants your object type's textures to be created. Use the passed IRenderer to load textures. This method should return a promise that resolves when all textures have been loaded.
- _releaseTextures(renderer)
- Optional override called by the runtime when it wants your object type's textures to be released. Use the passed IRenderer to release textures. This method is synchronous. Release any textures and drop the references to them.
- _onDynamicTextureLoadComplete()
- Optional override called by the runtime when a dynamic texture load has completed. If an object is created at runtime that does not already have its textures loaded, the runtime will call
_loadTextures()
but continue running the project while the textures are loaded asynchronously. When they finish loading, the runtime then calls this override so you have an opportunity to update any references to the newly loaded texture.
- async _preloadTexturesWithInstances(renderer)
- Optional override called just before starting a layout once all instances are created. This provides an opportunity to load textures depending on the details of the instances on the layout. Use the passed IRenderer to load textures. This may be used for purposes such as rasterizing SVG at an appropriate resolution before the layout starts.
Construct 3 Manual
Construct.net
2024-05-15
2024-05-15
You are here:
Search this manual:
This manual entry was last updated on 15 May, 2024 at 15:22