Download

[LEARNING RESOURCES] Introduction to C++ Programming in UE4

Could someone please clarify this sentence:

I can be found on this page.

I think it is grammatically incorrect, or at least the first half of it is. I believe what the author is trying to say here, is that you can wrap these kinds of functions in an pre-processor directive, to decrease the potential size of your executable. Is that correct?

Hey Dave :slight_smile: You’re right, it looks like we can clear up that sentence a bit. I’ll take a look at it tomorrow, should be a quick fix. Also right in your interpretation - anything within that WITH_EDITOR #ifdef will work in the editor, but will be compiled out of the final game project when you package the game.

You can see an example in the Twin Stick Shooter Tutorial (beginning ~9:40 in video 5), again using PostEditChangeProperty. Working with this function on the C++ side gives you similar in-editor behavior to enabling re-running a Blueprint Class’s construction script after a property change. Super helpful at design time, but since you won’t be changing properties in the final game, it’s a good candidate for using that directive to remove it from your executable.

Thanks for the feedback!