reckfellENGINE

EditorImportPlugin

Imports custom source formats into editor resources.

On this page
class EditorImportPluginReckfellSharpEditorInherits ResourceImporter

Derive from EditorImportPlugin and register an instance through EditorPlugin.AddImportPlugin(). Declare a stable identifier, source extensions, output class and output extension. _Import() validates input, creates the resource and saves it at the supplied savePath with the appropriate extension. Return the actual read, conversion or save error.

The editor stores settings beside the source in .import and generated data in the project cache. Load through the source path, not a hard-coded cache filename. When disabling the plugin, call RemoveImportPlugin() with the same instance and release your owned reference.

Complete C# example and reimport.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

EditorImportPluginConstructor
# EditorImportPlugin
C#
public EditorImportPlugin();

Methods15

AppendImportExternalResourceError
# AppendImportExternalResource
C#
public Error AppendImportExternalResource(string path, Reckfell.Collections.Dictionary customOptions = null, string customImporter = "", Variant generatorParameters = default);

Synchronously import an additional external resource during the current import process. Call from _Import(), for example for a generated image needing its own importer. Calls outside an import process are rejected; this is not a replacement for ordinary ReimportFiles().

Parameters
NameTypeDefault
pathstring—
customOptionsReckfell.Collections.Dictionarynull
customImporterstring""
generatorParametersVariantdefault
path

The additional source resource path.

customOptions

Import option overrides; an empty dictionary by default.

customImporter

The stable identifier of a specific importer, or an empty string for normal selection.

generatorParameters

Extra metadata stored as generator_parameters in the .import file remap section.

Returns Error

The nested import result code.

_CanImportThreadedbool
# _CanImportThreaded
C#
public virtual bool _CanImportThreaded();

Allow the importer to run on parallel threads. The default is false. Return true only when the handler and its dependencies are thread-safe; do not access the editor tree from worker threads.

Returns bool

true for thread-safe parallel import; otherwise false.

_GetFormatVersionint
# _GetFormatVersion
C#
public virtual int _GetFormatVersion();

Return this importer's generated-data format version; the default is 0. Increment it for incompatible output changes. This is not the engine version or the plugin display name.

Returns int

The integer importer format version.

_GetImportOptionsReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# _GetImportOptions
C#
public virtual Reckfell.Collections.Array<Reckfell.Collections.Dictionary> _GetImportOptions(string path, int presetIndex);

Return preset settings as an array of dictionaries. Each requires name and default_value; property_hint, hint_string and usage are optional. The default_value type determines the property type; a range hint does not replace validation in _Import().

Parameters
NameTypeDefault
pathstring—
presetIndexint—
path

The source path whose options are being requested.

presetIndex

The initial-value preset index; this callback is also used without declared presets.

Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>

An array of option dictionaries, or an empty array when there are no options.

_GetImportOrderint
# _GetImportOrder
C#
public virtual int _GetImportOrder();

Set importer execution order: smaller values run first. The default is 0. Use this for dependency ordering, not for choosing between importers for the same extension.

Returns int

The numerical import order.

_GetImporterNamestring
# _GetImporterName
C#
public virtual string _GetImporterName();

Return a unique stable importer identifier. It is stored in .import and used for reimport; _GetVisibleName() controls the display label.

Returns string

An identifier such as reckfell.docs.rgb_material.

_GetOptionVisibilitybool
# _GetOptionVisibility
C#
public virtual bool _GetOptionVisibility(string path, StringName optionName, Reckfell.Collections.Dictionary options);

Determine whether an option is visible in the Import dock using current options. All options are visible by default. Hiding a field does not remove its value or replace validation in _Import().

Parameters
NameTypeDefault
pathstring—
optionNameStringName—
optionsReckfell.Collections.Dictionary—
path

The source file path.

optionName

The option name, matching its name key.

options

Current import option values.

Returns bool

true to show the option; false to hide it.

_GetPresetCountint
# _GetPresetCount
C#
public virtual int _GetPresetCount();

Return the number of initial option presets. The default is no presets (0); _GetImportOptions() must still return a valid array.

Returns int

The number of presets.

_GetPresetNamestring
# _GetPresetName
C#
public virtual string _GetPresetName(int presetIndex);

Return a readable preset name for an index declared by _GetPresetCount().

Parameters
NameTypeDefault
presetIndexint—
presetIndex

A preset index from 0 to _GetPresetCount() - 1.

Returns string

The selected preset name.

_GetPriorityfloat
# _GetPriority
C#
public virtual float _GetPriority();

Set preference when automatically selecting an importer for a source extension. Higher values are preferred; the default is 1.0. The import system also uses an identifier already stored in .import and explicit per-file selection.

Returns float

The numerical importer priority.

_GetRecognizedExtensionsstring[]
# _GetRecognizedExtensions
C#
public virtual string[] _GetRecognizedExtensions();

Return source extensions without dots. Matching is case-insensitive. Prefer a custom extension to avoid capturing ordinary project files.

Returns string[]

An extension array such as ["rfcolor"].

_GetResourceTypestring
# _GetResourceType
C#
public virtual string _GetResourceType();

Return the class name of the imported resource, such as StandardMaterial3D. This is the output class, not the source extension.

Returns string

A Reckfell resource type name.

_GetSaveExtensionstring
# _GetSaveExtension
C#
public virtual string _GetSaveExtension();

Return the generated primary resource extension without a dot. For ordinary import, _Import() must save the resource at savePath + "." + this extension.

Returns string

The output extension, for example material.

_GetVisibleNamestring
# _GetVisibleName
C#
public virtual string _GetVisibleName();

Return a readable label for importer selection in the Import dock. Changing the label does not require changing the stable identifier.

Returns string

The importer display name.

_ImportError
# _Import
C#
public virtual Error _Import(string sourceFile, string savePath, Reckfell.Collections.Dictionary options, Reckfell.Collections.Array<string> platformVariants, Reckfell.Collections.Array<string> genFiles);

Convert the source file and save the primary resource at savePath + "." + _GetSaveExtension(). Validate input and return any read, conversion or save error. Populate platformVariants and genFiles only for variants and additional files actually created.

Parameters
NameTypeDefault
sourceFilestring—
savePathstring—
optionsReckfell.Collections.Dictionary—
platformVariantsReckfell.Collections.Array<string>—
genFilesReckfell.Collections.Array<string>—
sourceFile

The source file path in the project.

savePath

The editor-supplied output base path without an extension. Do not replace it with a hard-coded cache path.

options

Import setting values; do not rely solely on the UI to validate types and ranges.

platformVariants

Output array of feature tags for saved variants at savePath + "." + tag + "." + extension. Leave empty when there are no variants.

genFiles

Output array of full asset:// paths to additional generated dependencies. The ordinary primary output does not need to be listed here.

Returns Error

Error.Ok only after successful import and saving; otherwise an error code.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.