But I have no idea where to put that code, if I need some software to compile and save a file, or if I just dump that code into the editor, or to some sort of config file in UE.
you can make a function library in C++, then you can use those functions anywhere in your project. its not too hard to work with as unreal engine sets it all up for you. heres some basic code to get you started.
Header file
UCLASS(BlueprintType, Category = "categoryName")
class UYourClassName : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, BlueprintPure)
void GetAllBBKeys(TArray<FName>& OutKeys) const;
};
Note i havent actually tested this, but that should atleast get you started.
also, you may have issues with hot realoding your code. if you do, try restarting the editor, or running it directly from visual studio.
I have visual studio installed, and I’ve been through that setup, it should be working fine, but I don’t know where or how to save that code you posted.
So I started new .h and .cpp files in visual studio and typed that code you mentioned. Edited the names to my like and now do I just save those files? where? and how do I access them in UE?
you make a new C++ class in unreal engine. it will handle all the setup and boilerplate stuff for you. you can set it to be any of class (actor for example), but if you do youll have to make a child of that class in order to use the function. making it a function library or blugin will make it class agnostic which seems like what you want (ie, you’ll be able to use it anywhere in your project). id recommend plugin over bleuprint function library, as plugins can be easily pulled into other projects
im in unreal 4.27, but it should be a similar process in unreal 5+