class
IScriptExportable
Interface to be implemented by types that are exported to scripting.
Such types should also be decorated with B3D_SCRIPT_EXPORT() macro, along with any fields or methods that should be exported.
Public
Constructors
IScriptExportable
IScriptExportable
IScriptExportable
Methods
~IScriptExportable
GetScriptObjectWrapper
Returns the script object wrapper associated with this object.
This will be null if the object was never passed to script world, or if was passed but has gone out of scope.
ShouldPersistScriptReload
If true, the object will be given an opportunity to back up its data before a script reload operation, and its script object will be automatically recreated once script reload ends, and given an opportunity to restore the backed up data.
If false, the script object and its wrapper will be destroyed on script reload.
NotifyScriptWillReload
Called on all script objects before script object reload happens.
BackupDataBeforeScriptReload
RecreateScriptObjectAfterScriptReload
Called on all script objects after script assemblies have been reloaded.
This needs to recreate the internal script object using the new assemblies, as the old one will have been destroyed during the reload. Only relevant for script objects that persist script reload (i.e. ShouldPersistScriptReload() returns true). Returns true if the script object was created, otherwise the responsibility will fall to the script object wrapper.
RestoreDataAfterScriptReload
Called on all script objects after script objects have been created in RecreateScriptObjectAfterScriptReload().
Allows you to restore data backed up in BackupDataBeforeScriptReload() call to the newly created script object. Only relevant for script objects that persist script reload (i.e. ShouldPersistScriptReload() returns true).
NotifyScriptReloadFinished
Called on all script object wrappers as the final step in script reload, after RestoreDataAfterScriptReload().
Allows you to perform actions that require the entire scripting world to be fully recreated.
Operators
operator=
operator=
Internal
Methods
ClearAssociatedScriptObjectWrapper
Clears the currently associated script object wrapper.
Generally called before the script object is destroyed.
Private
Methods
AssociateWithScriptObjectWrapper
Notifies the object that a script object wrapper has been created for it, allowing a script object to access the native object through it.