class
ScriptAssemblyManager
Stores data about managed serializable objects in specified assemblies.
Public
Methods
LoadAssemblyInfo
Loads all information about managed serializable objects in an assembly with the specified name.
Assembly must be currently loaded. Once the data has been loaded you will be able to call GetSerializableObjectInfo() and HasSerializableObjectInfo() to retrieve information about those objects. If an assembly already had data loaded it will be rebuilt.
- assemblyName
- Name of the assembly to load the information about.
- typeMappings
- Contains information about managed objects that wrap native objects.
ClearAssemblyInfo
Clears any assembly data previously loaded with loadAssemblyInfo().
GetSerializableObjectInfo
Returns managed serializable object info for a specific managed type.
- ns
- Namespace of the type.
- typeName
- Name of the type.
- outInfo
- Output object containing information about the type if the type was found, unmodified otherwise.
Returns: True if the type was found, false otherwise.
GetSerializableObjectInfo
Returns managed serializable object info for a specific managed type.
Object must be serializable for this information to be present.
GetTypeInfo
Generates or retrieves a type info object for the specified managed class, if the class is serializable.
GetScriptWrapperMetaData
Returns script wrapper object meta-data for the type as specified by the provided RTTI type ID.
GetScriptWrapperMetaData
Returns script wrapper object meta-data for the type as specified by the script type.
HasSerializableObjectInfo
Checks if the managed serializable object info for the specified type exists.
- ns
- Namespace of the type.
- typeName
- Name of the type.
Returns: True if the object info was found, false otherwise.
GetScriptAssemblies
Returns names of all assemblies that currently have managed serializable object data loaded.
GetBuiltinClasses
Returns type information for various built-in classes.
GetReflectableFromManagedObject
Converts a managed object into an IReflectable object.
The system first checks if the managed object is just a wrapper for a reflectable object already, and if so returns the wrapped reflectable object. Otherwise the managed object is serialized and the serialized version of the object is returned. The provided object cannot be an array, list, dictionary, component or a resource.
GetManagedObjectFromReflectable
Converts a reflectable object into a managed object.
The system first checks if the IReflectable is just a serialized managed object, in which case the object is deserialized and returned. Otherwise the system assumes the reflectable type is script exportable and attempts to retrieve or the script object wrapper for the object.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.
Private
Methods
ClearScriptObjects
Deletes all stored managed serializable object infos for all assemblies.
InitializeBaseTypes
Initializes the base managed types.
These are the types we expect must exist in loaded assemblies as they're used for various common operations.
InitializeScriptWrapperMetaDataLookup
Creates a lookup that allows you to find script object wrapper type based on RTTI type ID or script type.
Should be called after an assembly is loaded or reloaded.