class
SpecificImporter
Abstract class that is to be specialized for converting a certain asset type into an engine usable resource (for example a .png file into an engine usable texture).
On initialization this class must register itself with the Importer module, which delegates asset import calls to a specific importer.
Public
Constructors
SpecificImporter
Methods
~SpecificImporter
IsExtensionSupported
Check is the provided extension supported by this importer.
IsMagicNumberSupported
Check if the provided magic number is supported by this importer.
GetAsyncMode
Returns the level of asynchronous import supported by this importer.
Import
Imports the given file.
If file contains more than one resource only the primary resource is imported (for example for an FBX a mesh would be imported, but animations ignored).
- filePath
- Pathname of the file, with file extension.
- importOptions
- Options that can control how is the resource imported.
Returns: null if it fails, otherwise the loaded object.
ImportAll
Imports the given file.
This method returns all imported resources, which is relevant for files that can contain multiple resources (for example an FBX which may contain both a mesh and animations).
- filePath
- Pathname of the file, with file extension.
- importOptions
- Options that can control how are the resources imported.
Returns: Empty array if it fails, otherwise the loaded objects. First element is always the primary resource.
CreateImportOptions
Creates import options specific for this importer.
Import options are provided when calling import() in order to customize the import, and provide additional information.
GetDefaultImportOptions
Gets the default import options.
Returns: The default import options.