I’m trying to make a build of my game (inclusively nativized), and I keep getting this error (Attached) that makes the build fail. It’s referring to an interface function in my AI controller that gets a map of strings to floats. I’m using this to hold all my cooldown floats in one place. While the AI controller has this interface, it doesn’t use this particular function. I’ve tried several things already to solve the problem and this is what I’ve found so far:
- The problem is not exclusive to, and probably not even caused by, the AI controller. I moved this function to a different interface and I get the same error with my AnimBP_FirstPerson blueprint instead. Since “AI” would be alphabetically before “Anim”, I’m assuming UE builds things in alphabetical order and it’s just breaking at the first instance of this problem before it can actually tell all of the places it appears.
- I have tried making a map and attaching it to the function in the AI Controller, it did nothing.
- Deleting/editing/moving the function does nothing to help. The map in question is a string to float map. I’ve tried text and name to float and the same thing happens. Renaming the pin also doesn’t help.
- I have deleted the Saved and Intermediate folders. still, nothing.
- I suspected it could be a bug with the engine, so I tried updating to 4.23 and building there. still, same error. So either it isn’t a bug with the engine or it is one that has carried over from 4.22 to 4.23.
- Due to the build breaking as soon as it finds the first instance of the problem, it’s entirely possible that it’s maps themselves that are broken, and this is just the first time maps show up when it builds.
- One thing I have noticed is in the error, it gives me a pathname -
“‘MapProperty /Script/NativizedAssets.AI_GenericController_C__pf3605976607:bpf__GetxCo
oldowns__pfT.bpp__Cooldowns__pf’” I notice there is a space after “MapProperty” could this be the mistake that’s causing it? idk but it looks out of place to me. I don’t even know how I would fix that, or where I’d go to do so.
I’ve spent at least 24 hours trying to fix this and having it fail after updating the engine was the last straw for me. So I’m asking for help here. is this a bug with the engine? I’m new to using maps, could I be using them wrong? what is it? I really hope I don’t have to redo this particular system without maps, but if I don’t solve this soon I might have to.
EDIT: I decided to test my theory about it being an engine bug. I opened a blank C++ project in 4.22 (same as my project) created a blank actor and added an interface with 1 function. it has a string-float map as the output pin. I then set the build to inclusive nativized mode and attempted a build. it failed. I was curious if maps are the only thing affected, so I changed the map to a set and it also failed! same error too, but it says "SetProperty " with a space on the end now rather than “MapProperty”. Changing the pin to an array made the build succeed. So is this an engine bug? This can’t possibly be intended behaviour, right?