class PlainTextImporter

Inherits: SpecificImporter

Imports plain text files (.txt, .xml, .json).

Public

Methods

IsExtensionSupported

bool IsExtensionSupported(const String &ext) const override

Check is the provided extension supported by this importer.

IsMagicNumberSupported

bool IsMagicNumberSupported(const u8 *magicNumPtr, u32 numBytes) const override

Check if the provided magic number is supported by this importer.

Import

SPtr<Resource> Import(const Path &filePath, SPtr<const ImportOptions> importOptions) override

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.