reckfellENGINE

EditorExportPreset

Export preset settings and manual resource selections.

On this page
class EditorExportPresetReckfellSharpEditorInherits RefCounted

Obtain EditorExportPreset through a platform’s CreatePreset or an export-plugin context. A new standalone preset is not added to the user list and does not become runnable automatically. This C# type exposes the listed getters; do not invent public SetExportFilter or SetFileExportMode methods from internal C++ names.

GetFilesToExport is the manual set, not completed build contents. It can be empty for ExportAllResources. ExportSelectedScenes selects serialized PackedEntity hierarchies, including .rscene levels and .rprefab prefabs, by resource type; the SDK enum name is retained. Dependencies, filters and export plugins further affect final contents.

GetCustomizedFiles returns an independent Dictionary with strip/keep/remove strings. GetFileExportMode checks only an exact path, not ancestor rules. GetCustomFeatures is the original comma-separated string. GetProjectSetting applies preset features and can therefore differ from host ProjectSettings.

GetOrEnv returns environment values as strings without type conversion. This complete helper explicitly parses an integer option and strictly validates 64 hex key characters before native ResolveEncryptionKey:

C#
using System;
using System.Globalization;
using Reckfell;

public static class ExportPresetTools
{
    public static int ReadInt(EditorExportPreset preset, StringName option, string environmentVariable)
    {
        using var value = preset.GetOrEnv(option, environmentVariable);
        if (value.VariantType == Variant.Type.Int)
            return checked((int)value.AsInt64());
        if (value.VariantType == Variant.Type.String &&
            int.TryParse(value.AsString(), NumberStyles.Integer, CultureInfo.InvariantCulture, out int parsed))
            return parsed;
        throw new InvalidOperationException($"Export option '{option}' must be a 32-bit integer.");
    }

    public static bool IsEncryptionKey(string? text)
    {
        if (text is null || text.Length != 64) return false;
        foreach (char character in text)
            if (!Uri.IsHexDigit(character)) return false;
        return true;
    }
}

GetEncryptionKey reads the stored string; ResolveEncryptionKey applies environment precedence and caches bytes on first call. Environment changes do not refresh this cache. Prepare the environment before first resolution; do not reuse an already resolved preset after changing it. Native parsing checks length but is not strict hex validation. Do not log keys.

GetVersion formats only the project-version fallback: an empty option can turn 1.0.0 into 1.0.0.0 for Windows metadata; a nonempty option is returned without normalization. This is metadata formatting, not a new engine version.

An isolated Windows preset, getters, Variant types, feature override, versions, key caching and the complete helper were checked in the current editor. Only synthetic values in the QA process were used. This run does not establish actual PCK encryption, dependency-expanded pack contents, export, UI behavior or target-platform execution.

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

Methods26

AreAdvancedOptionsEnabledbool
# AreAdvancedOptionsEnabled
C#
public bool AreAdvancedOptionsEnabled();

Returns whether advanced options are shown: includes active option searching and editor setting _export_preset_advanced_mode. It is neither an exported-game capability nor a separate saved flag of this preset.

Returns bool

Current advanced-option visibility including active search.

GetCustomFeaturesstring
# GetCustomFeatures
C#
public string GetCustomFeatures();

Returns the original comma-separated custom feature-tag string, not an array or the complete platform feature set. GetProjectSetting parses and adds them when selecting an override.

Returns string

Original comma-separated feature-tag string; initially empty.

GetCustomizedFilesReckfell.Collections.Dictionary
# GetCustomizedFiles
C#
public Reckfell.Collections.Dictionary GetCustomizedFiles();

Returns a new Dictionary of explicitly customized file or directory paths. Values are strings strip, keep or remove, not numeric FileExportMode values. Editing the dictionary does not change the preset. Empty does not mean the export contains no files.

Returns Reckfell.Collections.Dictionary

New Dictionary: path → strip/keep/remove string.

GetCustomizedFilesCountint
# GetCustomizedFilesCount
C#
public int GetCustomizedFilesCount();

Number of explicit path-customization entries, including directories; not final build-file or dependency count. Initially 0.

Returns int

Count of explicitly customized paths, including directories.

GetEncryptDirectorybool
# GetEncryptDirectory
C#
public bool GetEncryptDirectory();

Reads the PCK directory-encryption request; initially false. Does not establish successful encryption, a valid key or a matching export template.

Returns bool

Whether PCK directory encryption is requested.

GetEncryptPckbool
# GetEncryptPck
C#
public bool GetEncryptPck();

Reads the pack-data encryption flag; initially false. Actual file selection also depends on encryption include/exclude filters. This getter performs no encryption.

Returns bool

Whether pack encryption is requested.

GetEncryptionExFilterstring
# GetEncryptionExFilter
C#
public string GetEncryptionExFilter();

Returns the original comma-separated encryption-exclusion patterns. This is not the general ExcludeFilter: a file excluded from encryption can remain in the pack.

Returns string

Original encryption-exclusion pattern string.

GetEncryptionInFilterstring
# GetEncryptionInFilter
C#
public string GetEncryptionInFilter();

Returns the original comma-separated encryption-inclusion patterns. Separate from the general IncludeFilter and PCK directory-encryption flag.

Returns string

Original encryption-inclusion pattern string.

GetEncryptionKeystring
# GetEncryptionKey
C#
public string GetEncryptionKey();

Returns the stored preset key string, initially empty. Does not apply RECKFELL_SCRIPT_ENCRYPTION_KEY or return ResolveEncryptionKey’s result. Do not log the value.

Returns string

Stored key text without the environment override.

GetExcludeFilterstring
# GetExcludeFilter
C#
public string GetExcludeFilter();

Returns the original comma-separated export-exclusion patterns. General exclude is applied after general include. This getter does not compute final contents and is unrelated to encryption filters.

Returns string

Original general exclusion-pattern string.

GetExportFilterEditorExportPreset.ExportFilter
# GetExportFilter
C#
public EditorExportPreset.ExportFilter GetExportFilter();

Returns the initial resource-selection mode, initially ExportAllResources. The manual list has mode-specific meaning: selected hierarchies/resources with dependencies, excluded resources, or separate ExportCustomized rules. Later filters and export plugins can change the result.

Returns EditorExportPreset.ExportFilter

Current resource-selection mode.

GetExportPathstring
# GetExportPath
C#
public string GetExportPath();

Returns the stored output path, initially empty. It can be project-relative: native configuration converts an absolute path to a relative one. Does not create a directory or report the last actual exported file.

Returns string

Stored, possibly relative output path.

GetFileExportModeEditorExportPreset.FileExportMode
# GetFileExportMode
C#
public EditorExportPreset.FileExportMode GetFileExportMode(string path, EditorExportPreset.FileExportMode @default = EditorExportPreset.FileExportMode.NotCustomized);

Looks up an explicit entry for exactly this path; returns default if absent. The method itself neither searches ancestor rules nor checks file existence. Effective inheritance during export is handled separately.

Parameters
NameTypeDefault
pathstring—
defaultEditorExportPreset.FileExportModeEditorExportPreset.FileExportMode.NotCustomized
path

Exact asset:// file or directory path; the method does not traverse ancestors.

default

Result when no explicit entry exists; defaults to NotCustomized.

Returns EditorExportPreset.FileExportMode

Explicit mode for the exact path, or the supplied default.

GetFilesToExportstring[]
# GetFilesToExport
C#
public string[] GetFilesToExport();

Returns an independent string[] of manually selected paths. Meaning depends on ExportFilter; it can be empty under ExportAllResources while the project still exports. Not the complete dependency-expanded file set. HashSet ordering is not guaranteed.

Returns string[]

Copy of the manual path set with unspecified order.

GetIncludeFilterstring
# GetIncludeFilter
C#
public string GetIncludeFilter();

Returns the original comma-separated additional inclusion patterns. Not a list of already included resources. The general ExcludeFilter is applied later and can remove a matching file.

Returns string

Original general additional-inclusion pattern string.

GetOrEnvVariant
# GetOrEnv
C#
public Variant GetOrEnv(StringName name, string envVar);

Returns a nonempty environment variable as a String Variant without converting to the option type. Otherwise reads the preset option with its native type and possible plugin override. Supply an existing option for fallback and dispose the returned Variant with using.

Parameters
NameTypeDefault
nameStringName—
envVarstring—
name

Existing fallback option name, such as debug/export_console_wrapper.

envVar

Environment-variable name. A nonempty value is returned as a string without type conversion.

Returns Variant

String Variant from nonempty environment, otherwise the option’s native-typed value.

GetPatchesstring[]
# GetPatches
C#
public string[] GetPatches();

Returns an independent string[] of base-pack paths in stored order. Does not open packs, check their existence or build a patch. An empty list is not an ordinary-export error.

Returns string[]

Copy of the ordered base-pack path list.

GetPresetNamestring
# GetPresetName
C#
public string GetPresetName();

Returns this preset’s name. A new standalone preset from CreatePreset can be unnamed; the name is not automatically the platform name or game version.

Returns string

Preset name; a new instance can be unnamed.

GetProjectSettingVariant
# GetProjectSetting
C#
public Variant GetProjectSetting(StringName name);

Reads ProjectSettings using platform, preset and custom features. The result can differ from ordinary editor reads on the host OS. Use an existing key, check VariantType and dispose the result with using.

Parameters
NameTypeDefault
nameStringName—
name

Existing ProjectSettings key, not an export_presets.cfg key.

Returns Variant

Setting Variant after preset feature overrides.

GetScriptExportModeEditorExportPreset.ScriptExportMode
# GetScriptExportMode
C#
public EditorExportPreset.ScriptExportMode GetScriptExportMode();

Returns the built-in script-format export mode; initially BinaryTokensCompressed. This is neither PCK encryption nor the ExportDebug/ExportRelease configuration selection for C# publication.

Returns EditorExportPreset.ScriptExportMode

Text, BinaryTokens or BinaryTokensCompressed.

GetVersionstring
# GetVersion
C#
public string GetVersion(StringName name, bool windowsVersion);

Reads a version-string option. Nonempty values are returned unchanged. Only an empty option falls back to application/config/version and normalizes that fallback, including four-component Windows formatting when windowsVersion=true. Not a general semver validator or engine-version getter.

Parameters
NameTypeDefault
nameStringName—
windowsVersionbool—
name

Existing version-string option, such as application/file_version on a Windows preset.

windowsVersion

Apply four-component Windows formatting to the fallback. A nonempty option value itself is not normalized.

Returns string

Option string or normalized project-version fallback.

Hasbool
# Has
C#
public bool Has(StringName property);

Checks membership in the export-option map, not visibility or a nonzero value. Does not test inherited Resource properties: resource_name, for example, is not an export option.

Parameters
NameTypeDefault
propertyStringName—
property

Exact option name, such as binary_format/architecture.

Returns bool

True if the name exists in the option map.

HasExportFilebool
# HasExportFile
C#
public bool HasExportFile(string path);

Checks exact path membership in the manual selected-file set. Neither checks disk existence nor guarantees final-build inclusion: the set’s meaning depends on ExportFilter.

Parameters
NameTypeDefault
pathstring—
path

Exact manual-set path, normally asset://. Disk existence is not checked.

Returns bool

True if the exact path belongs to the manual set.

IsDedicatedServerbool
# IsDedicatedServer
C#
public bool IsDedicatedServer();

Returns the saved dedicated-server preset flag, initially false. Not a check of the current editor’s --headless state or proof that every visual resource was removed.

Returns bool

Saved dedicated-server preset flag.

IsRunnablebool
# IsRunnable
C#
public bool IsRunnable();

Reports whether EditorExport selected this specific preset as runnable for its platform. CreatePreset alone does not select a standalone preset. True does not establish a device, templates or successful execution.

Returns bool

Whether this preset is selected as runnable for its platform.

ResolveEncryptionKeybyte[]
# ResolveEncryptionKey
C#
public byte[] ResolveEncryptionKey();

On first call uses nonempty RECKFELL_SCRIPT_ENCRYPTION_KEY, otherwise the stored string, and caches the result. Length 64 produces 32 bytes; other lengths produce an empty array. Native parsing is not strict hex validation: validate every character first. Environment changes after the first call do not refresh this preset’s cache. GetEncryptionKey still returns the stored string.

Returns byte[]

Copy of the cached 32 bytes or an empty array; length 32 alone establishes neither valid hex nor template compatibility.

EditorExportPreset.ExportFilter

EditorExportPreset.FileExportMode

EditorExportPreset.ScriptExportMode

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.