reckfellENGINE

EditorScenePostImport

Post-processes scenes after import.

On this page
class EditorScenePostImportReckfellSharpEditorInherits RefCounted

Post-processes scenes after import.

Imported scenes can be automatically modified right after import by setting their Custom Script Import property to a tool script that inherits from this class. The EditorScenePostImport._PostImport callback receives the imported scene's root node and returns the modified version of the scene:

C#
using Reckfell;

// This sample changes all node names.
// Called right after the scene is imported and gets the root node.
[Tool]
public partial class NodeRenamer : EditorScenePostImport
{
    public override ReckfellObject _PostImport(Entity scene)
    {
        // Change all node names to "modified_[oldnodename]"
        Iterate(scene);
        return scene; // Remember to return the imported scene
    }

    public void Iterate(Entity node)
    {
        if (node != null)
        {
            node.Name = $"modified_{node.Name}";
            foreach (Entity child in node.GetChildren())
            {
                Iterate(child);
            }
        }
    }
}

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

Constructors1

EditorScenePostImportConstructor
# EditorScenePostImport
C#
public EditorScenePostImport();

Methods2

GetSourceFilestring
# GetSourceFile
C#
public string GetSourceFile();

Returns the source file path which got imported (e.g. asset://scene.dae).

Returns string
_PostImportReckfellObject
# _PostImport
C#
public virtual ReckfellObject _PostImport(Entity scene);

Called after the scene was imported. This method must return the modified version of the scene.

Parameters
NameTypeDefault
sceneEntity—
Returns ReckfellObject
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.