Show / Hide Table of Contents

Class LDtkPostprocessor

LDtkPostprocessor lets you hook into the import pipeline and run scripts after importing LDtk projects.
Inherit from this class to postprocess an import of a LDtk project.

Properties

| Improve this Doc View Source

ImportContext

The AssetImportContext of the current importing project file or level file.

Type Description
AssetImportContext

Methods

| Improve this Doc View Source

GetPostprocessOrder()

Override the order in which postprocessors and import interfaces are processed. This is also ordered alongside the import interfaces: GetPostprocessOrder()

Returns
Type Description
System.Int32

The order value. Default value is 1.

| Improve this Doc View Source

OnPostprocessLevel(GameObject, LdtkJson)

Use to perform operations after a level is created.
This is called when importing a separate level file, or called on every level gameobject in a project that doesn't use separate level files.

Parameters
Type Name Description
UnityEngine.GameObject root

The root GameObject of the imported LDtk level.
This GameObject has a LDtkComponentLevel component to get the level's json data with GetComponent.

LdtkJson projectJson

The Json data of the project this level is referenced by.

| Improve this Doc View Source

OnPostprocessProject(GameObject)

Use to perform operations after a project is created.
This would primarily be used with a project that does not use separate level files.

Parameters
Type Name Description
UnityEngine.GameObject root

The root GameObject of the imported LDtk project. This GameObject has a LDtkComponentProject component to get the project's json data with GetComponent.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX