ugs snippets
Hey guys ! Just wanted to let you know that I need to run some maintenance on the website because of the recent domain name changes from netlify. So, some pages will appear like this for a few days... but guess what's coming new to the pages ? A Dark theme switch !!!
This namespace contains snippets and commandlets to let us interact with the UGameplayStatics class, DataTables, AssetRegistry, Asynchronous asset loading.
Complete list of snippet codes can be found here.
They solve very specific problems and you might never use them. Just keep the snippet codes in mind. Explore them and fit it to your projects. It's aWIP namespace to which I keep adding as I learn.
See you later... 🖐
This section has some general advice about usage of few of the classes/functions generated by the codes above. Sometimes there migth be better ways to do things and I will list them here.
This part is not important to use the extension. Feel free to skip.
Used to load assets by path in C++ code. Try not to load assets directly in C++ like this. Having EditAnywhere (Or even better, fully data-driven using DataTables) is better.
That said, this is useful when loading textures for UI etc.
static ConstructorHelpers::FObjectFinder<${3:UStaticMesh}> ${1:UniqueName}(TEXT("/Game/$2"));
if(${1:UniqueName} != null) {
${4:TargetObject} = ${1:UniqueName}.Object;
}
Used to load classes(One of few ways to load BP classes into C++).
static ConstructorHelpers::FClassFinder<${3:ParentClass}> ${1:UniqueName}(TEXT("/Game/$2"));
if(${1:UniqueName} != null) {
${4:TargetSubClassOf} = ${1:UniqueName}.Class;
}
I upload weekly and revamp bi-monthly. You can support my work at Patreon | Paypal | Marketplace | Gumroad