- Open the main header file for your project; for example, if your project's name is Chapter_11, you'll open Chapter_11.h. Add the following line of code:
#pragma once#include "CoreMinimal.h"DECLARE_LOG_CATEGORY_EXTERN(LogCh11, Log, All);
As defined in AssertionMacros.h, there are three arguments to this declaration, which are as follows:
- CategoryName: This is the log category name being defined (LogCh11 here)
- DefaultVerbosity: This is the default verbosity to use on log messages
- CompileTimeVerbosity: This is the verbosity to bake into compiled code
- Inside the main .cpp file for your project (Chapter_11.cpp in our case), include the following line of code:
#include "Chapter_11.h"#include "Modules/ModuleManager.h"IMPLEMENT_PRIMARY_GAME_MODULE( ...