# Nativize Blueprint Error while packaging : Shadowing is not allowed

**URL:** <https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843>\
**Category:** Blueprint\
**Tags:** unreal-engine, Packaging, question, Blueprint, CPP\
**Created:** [July 22, 2016, 8:21pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843 "2016-07-22T20:21:59Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [July 22, 2016, 8:21pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/1 "2016-07-22T20:21:59Z")

</div>

Hi there. I’m using nativize blueprint on packaging. I’m fairly sure this isn’t an intended limitation.  
Can someone familiar with nativize blueprint please explain to me what should i be looking out for? I search the entire blueprint class didn’t see any issue with the variable Success or anything.

MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: D:/Users/JeremyC/Documents/Unreal Projects/ProjectCombine/Intermediate/Plugins/NativizedScript/Source/NativizedScript/Public/AIController\_BaseInfantry\_\_pf.h(63) : Member variable declaration: ‘bpv\_\_K2Node\_SwitchEnum\_CmpSuccess\_\_pf’ cannot be defined in ‘AIController\_BaseInfantry\_C\_\_pf’ as it is  
already defined in scope ‘AIController\_BasicAI\_C\_\_pf’ (shadowing is not allowed)

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [July 25, 2016, 2:50pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/2 "2016-07-25T14:50:23Z")

</div>

Hey Frozenfire,

- Are you able to package the project successfully without nativize blueprint assets enabled?
- Have you been able to reproduce the error in a clean project at all?
- If so, have you determined what is causing the issue?

---

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [July 26, 2016, 8:33pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/3 "2016-07-26T20:33:13Z")

</div>

1. Package will fail.
2. No as I do not know the cause. If someone can point me to the meaning of that message perhaps I could investigate. With no clue of what is causing this. I can’t even begin to reproduce it.
3. Cannot be deteremined. I’m not too skilled with C++ . But if someone can shed the light on what does the error message means ,perhaps I could have osme clue to investigate further.

---

<div class="post-metadata">

**Author:** ![rantrod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rantrod](https://forums.unrealengine.com/u/rantrod)\
**Post date:** [July 27, 2016, 6:00am UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/4 "2016-07-27T06:00:06Z")

</div>

Shadowing in C++ simply means that there are two variables with the same name at different scopes. For example,

```
int MyVar = 4;
if(go_into_this_block)
{
    int MyVar = 5; // this declaration shadows the previous one
    ...

```

In regular C++ shadowing is allowed though you might get a warning. In Unreal it’s a no-no. Especially when it comes to BPs.

The error simply says that you have a variable name present in AIController\_BaseInfantry that can also be found in AIController\_BasicAI. Change the variable name in one of those two if you intend to keep both. If you don’t intent to keep both, then remove it from the child class (probably the Infantry one). Not too familiar with Nativize but the name of the variable might be CmpSuccess.

---

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [July 27, 2016, 5:01pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/5 "2016-07-27T17:01:34Z")

</div>

thanks for the clarification.

I kind of suspect that being the case, however  
If Blueprint doesn’t allowed shadowing ( whcih I’m aware ) how is it possible that I have 2 similar variable? this isn’t possible at all. If you attempt to create a variable that a parent class already have you will get an error.

---

<div class="post-metadata">

**Author:** ![rantrod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rantrod](https://forums.unrealengine.com/u/rantrod)\
**Post date:** [July 27, 2016, 8:42pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/6 "2016-07-27T20:42:35Z")

</div>

> If you attempt to create a variable that a parent class already have you will get an error.

~~That’s not true. If you create the variable in the child BP first, and then create a variable with the same name in the parent BP, it doesn’t complain.~~

EDIT: I was wrong. If you create a variable in a parent class with the same name as a variable in a child class, Unreal will rename the child class variable (adding a “\_0”).

Not sure how it happened then. Did you check to see if there were variables of the same name in those classes? If yes, it’s easy enough to fix. If no, then the Nativize variable name generation might have a bug. It’s a brand new feature after all. If the answer is no - you don’t see a variable with the same name in those two classes - then I would repost in the Bugs section.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [July 28, 2016, 12:42pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/7 "2016-07-28T12:42:59Z")

</div>

Hey Frozenfire,

Could you provide a project that this is occurring in so I could take a closer look? I haven’t been able to reproduce it on my end.

If you have a project, please zip it up, upload it to Dropbox, and provide me with a link. If you’re concerned about privacy, you can provide me with a link on the forums: [https://forums.unrealengine.com/member.php?160394-Sean-Flint](https://forums.unrealengine.com/member.php?160394-Sean-Flint)

---

<div class="post-metadata">

**Author:** ![rantrod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rantrod](https://forums.unrealengine.com/u/rantrod)\
**Post date:** [July 28, 2016, 11:38pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/8 "2016-07-28T23:38:44Z")

</div>

As a side note I’ll say that when someone asks for PMs, the conversation moves away from the forum and the next time someone has the same issue, they have to ask the same question again. Is it possible to report back on what happened if he follows up with you? This is a feature I’m interesting in trying soon.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [July 29, 2016, 1:32pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/9 "2016-07-29T13:32:20Z")

</div>

The PM is only used for providing a private link to a project. All additional conversation will take place on this same thread, including any and all updates regarding the issue!

---

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [July 29, 2016, 6:29pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/10 "2016-07-29T18:29:09Z")

</div>

let me try to update this to 4.12.5 and see if it still eprsist. it’s hard to send our entire code over it’s very big. i tried deleting some stuff but there are tonnes of broken refrences when i delete. that would certainly mess up with the nativize

---

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [August 1, 2016, 10:27am UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/11 "2016-08-01T10:27:01Z")

</div>

HI Sean. I just updated to 4.12.5 the prevoius error disappeared , but a new one appear. I’m hesitatnt to open a new thread because it’s the same error message " shadowing not allowed" . I believe it’s the same issue. this time it’s pointing to a clearer variable.

```
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: D:/Users/JeremyC/Documents/Unreal Projects/ProjectCombine/Intermediate/WindowsNoEditor/NativizedAssets/Source/NativizedAssets/Public/BP_PCHUD__pf3757441892.h(65) : Function parameter: 'Canvas' cannot be defined in '__OnCanvasRenderTargetUpdate __DelegateSignature__ SC__DelegateSignature' as it is
 already defined in scope 'HUD' (shadowing is not allowed)

```

This is a natively declared delegate , i’m afraid I cannot do anything about this unluess i’m using source-built. I’m fairly certain if you use this delete , the error might appear.

![100925-delegate.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/c/c6cb96a1b1c19e4b1d593448ab3f729d955f71d0.jpeg)

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [August 1, 2016, 6:25pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/12 "2016-08-01T18:25:46Z")

</div>

Could you provide the code that you are using for that delegate?

Also, could you try recreating the setup in a clean project and provide a detailed list of repro steps?

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [August 5, 2016, 6:36pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/13 "2016-08-05T18:36:25Z")

</div>

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

---

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [December 8, 2016, 2:50pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/14 "2016-12-08T14:50:25Z")

</div>

I have managed to reproduce this in 4.14.

As mentioned in the original post. This is caused by the delegates having same output parameters. Extract and launch the project , proceeding the pack the project with nativize blueprint on will give you the error as mentioned.

link text

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [December 12, 2016, 4:44pm UTC](https://forums.unrealengine.com/t/nativize-blueprint-error-while-packaging-shadowing-is-not-allowed/364843/15 "2016-12-12T16:44:00Z")

</div>

Thanks for the test project. I’ve reproduced this and entered a ticket, which you can track using the link below: [Unreal Engine Issues and Bug Tracker (UE-39646)](https://issues.unrealengine.com/issue/UE-39646)

Have a great day
