I haven’t been able to reproduce this compile error that you’re getting, but if I use the exact code you posted, I’m able to compile and the function shows up in the editor while in PIE. However, the log says that the command is not recognized. Is there anything else that you’re doing that could be causing the compile error to appear?
That would be the reason. I apologize for not reading more thoroughly. This is definitely an issue and I’ll be testing it on our latest internal build and submitting a bug if it still occurs.
The issue is caused by how UHT is generating the code for the console command part of the exec specifier as you mentioned. You can see the code itself that causes this in the .generated.h file for the class. Thank you for reporting this and I’ll let you know as soon as I’ve placed the bug in.
Unfortunately it most likely won’t be in prior to 4.10 but when the issue is fixed, I can give you the commit which will allow you to fix it in a source-built version of the engine if you wish.
Unfortunately there hasn’t been any progress made on this bug at this time. The only thing that I can confirm is that it is still in the list of bugs ‘to fix’ in future versions of the engine. Thank you for your patience thus far.