Skip to content

Instantly share code, notes, and snippets.

@aikar
Created April 28, 2023 21:17
Show Gist options
  • Save aikar/9c179f0979b4237a341dd0cade8671fe to your computer and use it in GitHub Desktop.
Save aikar/9c179f0979b4237a341dd0cade8671fe to your computer and use it in GitHub Desktop.
//
// Created by Aikar on 4/2/2023.
//
#ifndef SAOMEGA_BLUEPRINTCACHE_H
#define SAOMEGA_BLUEPRINTCACHE_H
#include "includes.h"
class BlueprintCache {
private:
FString path;
UClass* cls;
public:
BlueprintCache(char* path) {
this->path = path;
}
BlueprintCache(FString path) {
this->path = path;
}
UClass* Get() {
if (!cls) {
cls = UVictoryCore::BPLoadClass(&path);
}
return cls;
}
};
#endif //SAOMEGA_BLUEPRINTCACHE_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment