I want to expose functions based on this template to blueprint
template<typename OutStructType>
static bool JsonObjectToUStruct(const TSharedRef<FJsonObject>& JsonObject, OutStructType* OutStruct, int64 CheckFlags = 0, int64 SkipFlags = 0, const bool bStrictMode = false, FText* OutFailReason = nullptr)
{
return JsonObjectToUStruct(JsonObject, OutStructType::StaticStruct(), OutStruct, CheckFlags, SkipFlags, bStrictMode, OutFailReason);
}
however, when I write UFUNCTION declaration like this
UFUNCTION(BlueprintCallable)
bool UPackagesBPLibrary::MakeFPackageFromJsonObj(const FJsonObject& Json, FPackage& OutStruct)
It says const FJsonObject& is not compatiable with TSharedRef. Is there any way to make a cast?