class
ManagedResource
Resource that internally wraps a managed resource object that can be of user-defined type.
Public
Constructors
ManagedResource
Methods
GetManagedInstance
Returns the internal managed resource object.
Backup
Serializes the internal managed resource.
Returns: An object containing the serialized resource. You can provide this to restore() method to re-create the original resource.
Restore
Restores a resource from previously serialized data.
- data
- Serialized managed resource data that will be used for initializing the new managed instance.
staticCreateUninitialized
Creates an empty managed resource without calling Initialize(), as a resource handle.
staticGetRttiStatic
Private
Methods
Initialize
Initializes all the internal data of this object.
Must be called right after construction for new objects, or after deserialization for deserialized objects. If requested, render proxy is created and queued for initialization on the render thread.
SetupScriptBindings
Sets up script bindings between native and managed class.
Must be called after creating the script object wrapper, or after assembly is reloaded.
CreateScriptObject
Creates the script object of the correct type.
- outObjectInformation
- Information about the resource type. Can be null in case the type does no longer exist.
Returns: Creates script object of the correct resource type, or if type cannot be found, script object of missing type.