# Blueprint can't be nativized with a function with delegate-type input variable

**URL:** <https://forums.unrealengine.com/t/blueprint-cant-be-nativized-with-a-function-with-delegate-type-input-variable/434599>\
**Category:** Blueprint\
**Tags:** nativization, unreal-engine, Packaging, bug-report, packaging-projects, Blueprint, question\
**Created:** [September 27, 2018, 2:17pm UTC](https://forums.unrealengine.com/t/blueprint-cant-be-nativized-with-a-function-with-delegate-type-input-variable/434599 "2018-09-27T14:17:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![k\_a\_s\_s\_k\_a\_s\_s](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/k_a_s_s_k_a_s_s/32/555828_2.png) [@k\_a\_s\_s\_k\_a\_s\_s](https://forums.unrealengine.com/u/k_a_s_s_k_a_s_s)\
**Post date:** [September 27, 2018, 2:17pm UTC](https://forums.unrealengine.com/t/blueprint-cant-be-nativized-with-a-function-with-delegate-type-input-variable/434599/1 "2018-09-27T14:17:35Z")

</div>

I have been having issues packaging a project with Nativization set to Inclusive. **The issue seems to be in passing a delegate to a function**.

Steps to reproduce (tested in 4.20.3, still present in 4.22.2):

1. Create empty project (code or blueprint)
2. Create an Actor
3. In the Actor, create an event dispatcher and a function that calls “Bind Event to DispatcherName”. Drag the event pin to the function input node to create a delegate-type input variable.
4. In the Actor, call the function on BeginPlay. Connect a CustomEvent to the dispatcher pin.
5. Place actor in map, add map to list of maps to package, set Nativization to Inclusive. Compile and package.

 ![254846-component.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/c/2ec9c9a3d2cf2c287e15f7128fbd2d6d2f614b99.png)

 ![254847-actor.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/9/119797c5b9a4409b8f0f415b692e2caf85f584b0.png)

This results in the following log: [Unreal cook log (nativization dispatcher variable bug) - Pastebin.com](https://pastebin.com/bZ34cy0U)  
The relevant part of the log being lines 626 - 628. So, it boils down to

`Reason: cannot convert from 'ATestActor_C __pf1010915279::FTestComponentDispatcher__ pf __TestComponent_C__ pf __SinglecastDelegate' to 'const UTestComponent_C__ pf1010915279::FTestComponentDispatcher __pf__ TestComponent_C __pf__ SinglecastDelegate'`

**The generated CPP file cannot convert the SinglecastDelegate to const SinglecastDelegate. The project packages fine without nativization and functions as intended, so this is clearly a natvization bug. Please let me know if there is a fix.**

---

<div class="post-metadata">

**Author:** ![Jeff\_A](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jeff\_A](https://forums.unrealengine.com/u/Jeff_A)\
**Post date:** [September 28, 2018, 2:00pm UTC](https://forums.unrealengine.com/t/blueprint-cant-be-nativized-with-a-function-with-delegate-type-input-variable/434599/2 "2018-09-28T14:00:11Z")

</div>

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

[https://epicsupport.force.com/unrealengine/s/](https://epicsupport.force.com/unrealengine/s/)

Thanks

---

<div class="post-metadata">

**Author:** ![k\_a\_s\_s\_k\_a\_s\_s](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/k_a_s_s_k_a_s_s/32/555828_2.png) [@k\_a\_s\_s\_k\_a\_s\_s](https://forums.unrealengine.com/u/k_a_s_s_k_a_s_s)\
**Post date:** [October 15, 2018, 1:05pm UTC](https://forums.unrealengine.com/t/blueprint-cant-be-nativized-with-a-function-with-delegate-type-input-variable/434599/3 "2018-10-15T13:05:20Z")

</div>

Just in case anyone else has this issue, you can now track it here: [Unreal Engine Issues and Bug Tracker (UE-64677)](https://issues.unrealengine.com/issue/UE-64677)
