Editor only UFUNCTIONS and UPROPERTIES

The work around (and it is quite disgusting) that I’ve found is this:

When you make a UPROPERTY automatic code is generated in the
Intermediate\Build\Win64\ YourProjectName \Inc\ YourProjectName\ YourBlueprint.gen.cpp

This generated code doesn’t seem to pay attention to the #WITH_EDITOR pragma, so you now have a file that is referencing for build a variable that as far as the actual script is concerned, doesn’t exist. The horrible hack around I found is that you can just go into that .gen.cpp file in …\Inc… and surround your variables with the same #WITH_EDITOR pragmas, this let me build fine, but I have no idea the knock on effects it might have. It also means that every time that .gen.cpp file gets deleted/regenerated, you will have to go back and re-add the #WITH_EDITOR pragmas.