The purpose of the life of this plugin is to reduce the amount of typing while writing C++ scripts for Unreal Engine projects.
- Drop the source directory inside
your_unreal_project/Plugins/QofL/ - Add a
QofLdependency inyour_unreal_project/Source/your_unreal_project/your_unreal_project.Build.csfile, e.g.:
PrivateDependencyModuleNames.AddRange(new string[] { "HTTP", "Json", "JsonUtilities", "AIModule", "Niagara", "QofL" });#include <QofL/log.h>
/*...*/
LOG(getNpcName(), "Invalid response");#include <QofL/check_ret.h>
/*...*/
auto npc = gpt3.getNpc();
CHECK_RET(npc);If function returns non-void, you can put return value after check
#include <QofL/check_ret.h>
/*...*/
auto npc = gpt3.getNpc();
CHECK_RET(npc, false);#include <QofL/obj_finder.h>
/* ... */
GetStaticMeshComponent()->SetStaticMesh(OBJ_FINDER(StaticMesh, "BathroomAndShowersPack/Mesh_01", "SM_Shower_Bathtub"));#include <QofL/class_finder.h>
/* ... */
mesh->SetAnimInstanceClass(CLASS_FINDER(AnimInstance, "Animation", "BP_DefaultMaleCharacterAnim"));#include <QofL/get_overlapping.h>
/* ... */
auto overlappingRooms = getOverlapping<ARoom>(*pawn);