Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mika314/qofl

Quality of life code snippets for Unreal Engine
https://github.com/mika314/qofl

cplusplus cpp unreal-engine unreal-engine-plugin unrealengine

Last synced: 1 day ago
JSON representation

Quality of life code snippets for Unreal Engine

Awesome Lists containing this project

README

        

# QofL
The purpose of the life of this plugin is to reduce the amount of typing while writing C++ scripts for Unreal Engine projects.

## Instalation
- Drop the source directory inside `your_unreal_project/Plugins/QofL/`
- Add a `QofL` dependency in `your_unreal_project/Source/your_unreal_project/your_unreal_project.Build.cs` file, e.g.:
```C#
PrivateDependencyModuleNames.AddRange(new string[] { "HTTP", "Json", "JsonUtilities", "AIModule", "Niagara", "QofL" });
```

## Logging

```C++
#include
/*...*/
LOG(getNpcName(), "Invalid response");
```

## Check, Log and Return

```C++
#include
/*...*/
auto npc = gpt3.getNpc();
CHECK_RET(npc);
```

If function returns non-void, you can put return value after check

```C++
#include
/*...*/
auto npc = gpt3.getNpc();
CHECK_RET(npc, false);
```

## Objects Finder

```C++
#include
/* ... */
GetStaticMeshComponent()->SetStaticMesh(OBJ_FINDER(StaticMesh, "BathroomAndShowersPack/Mesh_01", "SM_Shower_Bathtub"));
```

## Class Finder

```C++
#include
/* ... */
mesh->SetAnimInstanceClass(CLASS_FINDER(AnimInstance, "Animation", "BP_DefaultMaleCharacterAnim"));
```

## Get List of Overlaping Objects

```C++
#include
/* ... */
auto overlappingRooms = getOverlapping(*pawn);
```