Hi everyone, I am trying to implement this in my project but since I am not a programmer but a designer I don’t really know what am I failing at. My goal is to create the same custom node this user is creating:
DataTableRowHandle to Get Data table row: Only literal data table is supported
But I am completely lost. My code looks like this:
.h
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "DTFunctionLibrary.generated.h"
/**
*
*/
UCLASS()
class TESTCPLUSPLUS_API UDTFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
UFUNCTION(BlueprintCallable, Category = "DataTable")
static FCinematicDataTable GetRowByName(UDataTable* dataTable, FName pName, bool& result);
};
.cpp
#include "DTFunctionLibrary.h"
FCinematicDataTable UDTFunctionLibrary::GetRowByName(FCinematicDataTable* dataTable, FName pName, bool& result)
{
result = true;
FCinematicDataTable* data = dataTable->FindRow<FCinematicDataTable>(pName, "", false);
if (data == NULL)
{
result = false;
return FCinematicDataTable();
}
return *data;
}
Just like his, but for some reason I can’t get it done. This is probably something easy for a C++ programmer but for a designer like me it’s horrible, so even if its a little bit ridicule to ask for help like this, I would really appreciate if you showed me the way. Thanks in advance.