#define doesn't work with UFUNCTIONS
I tried to make use of #define with UFUNCTIONS today and it seems this is not working properly. I want to remove blueprint calls for my functions on demand to use of #define is probably the best approach to make this by changing only one variable in code.
Unfortunately, when I'm adding #if #endif for the UFUNCTION macro or full function definition, it is no longer available in blueprint no matter what.
I believe it shouldn't work that way or maybe I'm doing something wrong?
To reproduce the issue:
Any help with this issue would be appreciated.
asked Mar 07 '16 at 12:47 PM in Bug Reports
Ah I see, thank you for clarifying that. I'm not familiar with using the custom #defines myself so I wasn't quite understanding you. I see the issue now however and I've placed a bug in for the issue. For reference, the bug's number is UE-28103. I'll be sure to let you know if any changes are made to it in the future. Unfortunately, I can't think of any workarounds for the problem at the moment besides using existing specifiers.
answered Mar 09 '16 at 02:58 PM
Matthew J ♦♦ STAFF
UnrealHeaderTool that generates reflection information runs before C++ preprocessor. UHT simply assumes that every #if statement evaluates to false and generates no reflection info for these functions.
If you want these functions to do nothing on certain builds, you'd have to put the #if statements inside the functions bodies:
Follow this question
Once you sign in you will be able to subscribe for any updates here