EditorScenePostImport
Post-processes scenes after import.
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:
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
public EditorScenePostImport();Methods2
GetSourceFilestring
public string GetSourceFile();Returns the source file path which got imported (e.g. asset://scene.dae).
Returns
string_PostImportReckfellObject
public virtual ReckfellObject _PostImport(Entity scene);Called after the scene was imported. This method must return the modified version of the scene.
| Name | Type | Default |
|---|---|---|
scene | Entity | — |
Returns
ReckfellObjectReckfell Engine documentationBack to top ↑