C++ best practices

  • Don’t bind delegates in the constructor. Bind them in BeginPlay.
  • Use PostInitializeComponents for non-BeginPlay logic which needs to run in game only. This function is called before BeginPlay.
  • You can also use OnConstruction which is similar to Blueprint’s Construction Script, but this will run both ingame and during editing.
  • If you need to run logic on actor destruction, overriding EndPlay seems preferable to Destroyed. End Play only runs for game, while Destroyed runs in editor.


  • IsTemplate() returns true for CDOs