> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inworld.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Node Asset

[Overview](../overview) > Custom Node Asset

**Class:** `CustomNodeAsset` | **Inherits from:** `InworldNodeAsset`

Custom node asset that allows developers to implement their own data processing logic within graph workflows. Extends the base node functionality with custom processing delegates and flexible data transformation capabilities.

Typically, if the node you are creating does not involve calling the C++ library, you should inherit from this class. Implemente the ProcessBaseData method to define your own processing logic.

## Properties

* [NodeTypeName](#nodetypename)
* [ProcessBaseDataFunc](#processbasedatafunc)

## Methods

* [CreateRuntime](#createruntime)
* [ProcessBaseData](#processbasedata)
* [ProcessBaseDataIO](#processbasedataio)
* [RegisterCustomNode](#registercustomnode)
* [RegisterJson](#registerjson)

## Reference

### NodeTypeName

Gets the type name for this custom node.
Returns "Custom" to identify this as a custom node type.

#### Returns

**Type:** `string`

***

### ProcessBaseDataFunc

Gets or sets the delegate function for custom data processing operations.
Allows external assignment of custom processing logic for flexible node behavior.

#### Returns

**Type:** `ProcessBaseDataIODelegate`

***

### CreateRuntime

Creates the runtime representation of this custom node within the specified graph.
Initializes the custom node executor and creates a wrapper for processing operations.

```csharp theme={"system"}
bool CreateRuntime(InworldGraphAsset graphAsset)
```

#### Parameters

| Parameter  | Type                | Description                                        |
| ---------- | ------------------- | -------------------------------------------------- |
| graphAsset | `InworldGraphAsset` | The graph asset that will contain this custom node |

#### Returns

**Type:** `bool` - True if runtime creation succeeded; otherwise, false

***

### ProcessBaseData

Virtual method for processing input data in custom nodes.
Override this method in derived classes to implement specific data processing logic.

```csharp theme={"system"}
protected virtual InworldBaseData ProcessBaseData(InworldVector<InworldBaseData> inputs)
```

#### Parameters

| Parameter | Type                             | Description                         |
| --------- | -------------------------------- | ----------------------------------- |
| inputs    | `InworldVector<InworldBaseData>` | The vector of input data to process |

#### Returns

**Type:** `InworldBaseData` - The processed data result, or an error if processing fails

***

### ProcessBaseDataIO

Protected method for handling data input/output processing with error handling.
Manages the execution context and provides comprehensive error handling for processing operations.

```csharp theme={"system"}
protected virtual void ProcessBaseDataIO(IntPtr contextPtr)
```

#### Parameters

| Parameter  | Type     | Description                                                     |
| ---------- | -------- | --------------------------------------------------------------- |
| contextPtr | `IntPtr` | Pointer to the execution context for data processing operations |

***

### RegisterCustomNode

Protected method for registering the custom node type with the component manager.
Sets up the threaded creation executor for custom node instantiation.

***

### RegisterJson

Registers this custom node with JSON-based graph execution.
Stores the node asset reference and registers the custom node type.

```csharp theme={"system"}
bool RegisterJson(InworldGraphAsset graphAsset)
```

#### Parameters

| Parameter  | Type                | Description                           |
| ---------- | ------------------- | ------------------------------------- |
| graphAsset | `InworldGraphAsset` | The graph asset for JSON registration |

#### Returns

**Type:** `bool` - True if registration succeeded; otherwise, false

***

## Serialized Fields

The following fields are configurable in the Unity Inspector:

* **processBaseDataFunc** (`ProcessBaseDataIODelegate`) - Delegate function for custom data processing operations

## How to use

* **Override ProcessBaseData**: Most use cases should override `ProcessBaseData()` to implement custom processing logic
* **Error Handling**: Built-in error handling catches exceptions and returns appropriate error data
* **Thread Safety**: Custom nodes support threaded execution through the component manager
* **Flexible Logic**: Use `processBaseDataFunc` delegate for external processing logic assignment
* **Wrapper**: Custom nodes are wrapped in a `CustomNodeWrapper` class to provide a consistent interface for execution
