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)
Shadowing in C++ simply means that there are two variables with the same name at different scopes. For example,
int MyVar = 4;
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.
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.
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.
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
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.
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!
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
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.
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?
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
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.
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)
Have a great day