However, I get a series of errors with the GENERATED_BODY() as a direct result:
note xxx.h is header containing that function
xxx.h(40): error C2275: 'FName': illegal use of this type as an expression
x:\ue4\unrealengine\engine\source\runtime\core\public\UObject/NameTypes.h(522): note: see declaration of 'FName'
xxx.h(40): error C2275: 'FString': illegal use of this type as an expression
x:\ue4\unrealengine\engine\source\runtime\core\public\GenericPlatform/GenericPlatformSplash.h(34): note: see declaration of 'FString'
xxx.h(40): error C2065: 'Z_Param_Test': undeclared identifier
xxx.h(40): error C3861: 'P_GET_TMAP': identifier not found
xxx.h(40): error C2275: 'FName': illegal use of this type as an expression
x:\ue4\unrealengine\engine\source\runtime\core\public\UObject/NameTypes.h(522): note: see declaration of 'FName'
xxx.h(40): error C2275: 'FString': illegal use of this type as an expression
x:\ue4\unrealengine\engine\source\runtime\core\public\GenericPlatform/GenericPlatformSplash.h(34): note: see declaration of 'FString'
xxx.h(40): error C2065: 'Z_Param_Test': undeclared identifier
xxx.h(40): error C3861: 'P_GET_TMAP': identifier not found
If I remove UFUNCTION() the function is okay, but what I am trying to do involves TMap.
Just to shoot in a little addendum: We’re running version 4.15, which explicitly adds TMap support to blueprints. I can use TMap in blueprints, and have blueprint only functions that use TMaps as input, but I appear unable to create a C++ UFUNCTION that allows a TMap as an argument.
While I found some suggestions that the issue was related to template functions in general, TArray appears to work perfectly fine.
Hey, I’ve been wondering the same question and I still don’t know how to solve it. I have been looking through the blueprints TMap functions’ code to see how does Epic Games manage the TMap functions’ internally. Then I tried to copy these functions in a custom code but the error still appears.
Hello, I’m seeing the same issues and currently looking into it. This is likely a bug and will require source code changes for a fix so I’ll keep you posted.
Thank you for reporting this issue. I’ve placed in a bug report for this issue as it seems that functions aren’t been generated correctly, as there are things missing from the .generated.h files for any classes that this is declared in. You can find/track the bug report here: UE-42521
I’m marking it as resolved as there is nothing else to do with this post until the bug has been fixed. This is our standard practice and it’s for tracking reasons.
I had a bit of a bash at the problem because I wanted to see if I could make a bypass solution. Unfortunately, my wit didn’t last that long, but I did notice something.
Most of the function calls relating to TMaps in blueprints do not use a general implementation for handling TMaps. Instead, each function call that receives a TMap as a parameter has a CustomThunk that handles the individual map.
The CustomThunks were interesting, but my attempts to use CustomThunk were somewhat stonewalled by my lack of understanding of the underlying systems.
I just stumbled onto this and can’t even believe this is a bug. You know what, with some of the laziness I’ve seen before this doesn’t actually surprise me.
You’re telling me a huge update was released in 4.15 to add TMap and TSet support to blueprints, but not a single person on the development team tested it in C++ with the UFUNCTION macro? It quite literally doesn’t even work at all, I mean the person who made it never even tested it.
I think I’m going to write an email to someone somewhere at Epic because I strongly feel someone should lose their job over this. I mean this is beyond ridiculous, there was a huge section in the 4.15 update highlighting this feature, and it doesn’t even work.
If you would like to provide feedback about these features, please feel free to post in the feedback section of the Unreal Engine forums. This is the primary place to post feedback with the most visibility.
Thanks for your reply but I’m not interested in providing feedback on this feature, especially in some random forum where nobody of actual importance at Epic would see it. However what I have done is reached out directly to Epic through their corporate contact information as I find this unacceptable. If developers aren’t held accountable then things like this happen.
I’m also going to comb through LinkedIn and try out a few other forms of contact so that I can reach the right people at Epic, because nothing does a better job of getting lazy developers in trouble than complaining over and over to their boss.
Hey there! I would highly recommend using the feedback section of the forums as a means to communicate with us at Epic. Actually, the developers who implemented that feature are very active on that section and I also take posts out of there to make reports. Their bosses read those reports and often post in that section as well. The CEO even pops in every now and then to say hi and see how feels about the engine.
Anything posted outside of our forums/answerhub isn’t necessarily going to get a response. It may even just end up getting you blocked from their personal accounts.