Why are these definitions missing?

I am going to answer my own question here to also make a note to myself for the future not only regarding this question but other stumbling blocks I stepped in.

  • Whatever is inside the TargetRules shouldn’t bother me since it is used by the build pipeline to create the modules needed. The reason I bothered was because I had red wiggly wavelines below the name “TargetRules” (basically an error). I just needed to turn off live coding (as mentioned in the next point) and rebuild the project from inside of VS to get rid of the red wiggly lines below the name and the other 10k errors that I had in the Error List.

  • Turning off Live Coding in the Unreal Editor’s Editor Preferences stopped destroying my project over and over again. It seems to be a much cleaner approach when compiling the binaries by hand by clicking “Build” on the Project. Hot reload though seems to still work inside of UE.

  • *.build.cs file → Declares modules which are turned to binaries when clicking “Build” inside of Visual Studio so I can then use them in the C++ Code for example when declaring “OnlineSubsystem”, “OnlineSubsystemEOS”, “OnlineSubsystemUtils” inside of PublicDependencyModuleNames like so:

    PublicDependencyModuleNames.AddRange(new string[] { 
        "Core", "CoreUObject", "Engine", "InputCore", 
        "OnlineSubsystem", "OnlineSubsystemEOS", "OnlineSubsystemUtils" 
    });
    
  • Further: I deleted a component from inside VS but the “blueprint” in the content browser remained… Solution → Closing VS and UE. Then deleting the “binaries” folder from the project. Then opening VS. Then Building the Project. Then pressing CTRL+F5 opened UE and the component was also successfully removed from the content browser.

  • If I ever again come across a macro called “CPF_BlueprintCallable” I should remember to use “BlueprintCallable” instead since it seems that the CPF prefix are for compilers that can’t handle 64bit enums (As per the comment in ObjectMacros.h) as mentioned here. As for an example I used it like this to make the function “CreateSession” callable in my Blueprint Graph:

    public:
        UFUNCTION(BlueprintCallable)
        void CreateSession();