I’m new to the Unreal Engine’s C++ and have some problem.
I don’t know how to use this function: UKismetSystemLibrary::LoadAsset();
I don’t underestand it. Here is function arguments that are required:
void UKismetSystemLibrary::LoadAsset(const UObject* WorldContextObject, TSoftObjectPtr<UObject> Asset, UKismetSystemLibrary::FOnAssetLoaded OnLoaded, FLatentActionInfo LatentInfo)
And i don’t underestand how to use LatentInfo and OnLoaded callback.
And i don’t underestand how OnLoaded callback should look like, what arguments it can take. How do i should know it? From function’s sources?

if so then LoadedCallback should be like this:
UKismetSystemLibrary::FOnAssetLoaded OnLoadedCallback(UObject* LoadedObject);
But … how do i return this type? UKismetSystemLibrary::FOnAssetLoaded .
And it dosen’t want to accept it. Because “No suitable constructor exists …”
And in google no code examples that will help to work with this function.
It looks like this async asset loading stuff done by everyone in blueprints, not in c++.
I can do it on blueprints as well, it’s not the case.
Because case is - what if i met some async functions again in future. How do i should handle them?
And also - i know that c++ supports lambdas. Can they be used here?
Thanks.

