UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DataTableFunctionLibrary.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "UObject/Script.h"
11#include "Engine/DataTable.h"
13#include "DataTableFunctionLibrary.generated.h"
14
15class UCurveTable;
16
18UENUM()
20{
21 enum Type : int
22 {
27 };
28}
29
30UCLASS(MinimalAPI)
32{
34
35 UFUNCTION(BlueprintCallable, Category = "DataTable", meta = (ExpandEnumAsExecs="OutResult", DataTablePin="CurveTable"))
36 static ENGINE_API void EvaluateCurveTableRow(UCurveTable* CurveTable, FName RowName, float InXY, TEnumAsByte<EEvaluateCurveTableResult::Type>& OutResult, float& OutXY,const FString& ContextString);
37
39 UFUNCTION(BlueprintPure, Category = "DataTable", meta=(ScriptMethod="GetRowStruct"))
40 static ENGINE_API const UScriptStruct* GetDataTableRowStruct(const UDataTable* Table);
41
42 // Returns whether or not Table contains a row named RowName
43 UFUNCTION(BlueprintCallable, Category = "DataTable", meta=(ScriptMethod="DoesRowExist"))
44 static ENGINE_API bool DoesDataTableRowExist(const UDataTable* Table, FName RowName);
45
46 UFUNCTION(BlueprintCallable, Category = "DataTable", meta=(ScriptMethod="GetRowNames"))
47 static ENGINE_API void GetDataTableRowNames(const UDataTable* Table, TArray<FName>& OutRowNames);
48
53 UFUNCTION(BlueprintCallable, Category = "DataTable", meta=(ScriptMethod="GetColumnNames"))
54 static ENGINE_API void GetDataTableColumnNames(const UDataTable* Table, TArray<FName>& OutColumnNames);
55
60 UFUNCTION(BlueprintCallable, Category = "DataTable", meta=(ScriptMethod="GetColumnExportNames"))
61 static ENGINE_API void GetDataTableColumnExportNames(const UDataTable* Table, TArray<FString>& OutExportColumnNames);
62
67 UFUNCTION(BlueprintCallable, Category = "DataTable", meta=(ScriptMethod="GetColumnNameFromExportName"))
68 static ENGINE_API bool GetDataTableColumnNameFromExportName(const UDataTable* Table, const FString& ColumnExportName, FName& OutColumnName);
69
75 UFUNCTION(BlueprintCallable, Category = "DataTable", meta=(ScriptMethod="GetColumnAsString"))
76 static ENGINE_API TArray<FString> GetDataTableColumnAsString(const UDataTable* DataTable, FName PropertyName);
77
79 UFUNCTION(BlueprintCallable, CustomThunk, Category = "DataTable", meta=(CustomStructureParam = "OutRow", BlueprintInternalUseOnly="true"))
80 static ENGINE_API bool GetDataTableRowFromName(UDataTable* Table, FName RowName, FTableRowBase& OutRow);
81 static ENGINE_API bool Generic_GetDataTableRowFromName(const UDataTable* Table, FName RowName, void* OutRowPtr);
83
84#if WITH_EDITOR
91 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName="Fill Data Table from CSV String", meta=(AdvancedDisplay="ImportRowStruct", ScriptMethod="FillFromCSVString"))
93
100 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName = "Fill Data Table from CSV File", meta=(AdvancedDisplay="ImportRowStruct", ScriptMethod="FillFromCSVFile"))
102
109 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName = "Fill Data Table from JSON String", meta=(AdvancedDisplay="ImportRowStruct", ScriptMethod="FillFromJSONString"))
111
118 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName = "Fill Data Table from JSON File", meta=(AdvancedDisplay="ImportRowStruct", ScriptMethod="FillFromJSONFile"))
120
126 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName="Export Data Table to CSV String", meta=(ScriptMethod="ExportToCSVString"))
128
134 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName = "Export Data Table to CSV File", meta=(ScriptMethod="ExportToCSVFile"))
135 static ENGINE_API bool ExportDataTableToCSVFile(const UDataTable* DataTable, const FString& CSVFilePath);
136
142 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName = "Export Data Table to JSON String", meta=(ScriptMethod="ExportToJSONString"))
144
150 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", DisplayName = "Export Data Table to JSON File", meta=(ScriptMethod="ExportToJSONFile"))
151 static ENGINE_API bool ExportDataTableToJSONFile(const UDataTable* DataTable, const FString& JSONFilePath);
152
154 UFUNCTION(BlueprintCallable, CustomThunk, Category = "Editor Scripting | DataTable", meta=(AutoCreateRefTerm="RowName", CustomStructureParam="RowData"))
155 static ENGINE_API void AddDataTableRow(UDataTable* const DataTable, const FName& RowName, const FTableRowBase& RowData);
157
159 UFUNCTION(BlueprintCallable, Category = "Editor Scripting | DataTable", meta = (AutoCreateRefTerm = "RowName"))
160 static ENGINE_API void RemoveDataTableRow(UDataTable* DataTable, const FName& RowName);
161#endif //WITH_EDITOR
162};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define DECLARE_FUNCTION(func)
Definition ObjectMacros.h:783
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
Definition NameTypes.h:617
Definition Array.h:670
Definition EnumAsByte.h:22
Definition BlueprintFunctionLibrary.h:16
Definition CurveTable.h:43
Definition DataTableFunctionLibrary.h:32
Definition DataTable.h:81
Definition Class.h:1720
Definition DataTableFunctionLibrary.h:20
Type
Definition DataTableFunctionLibrary.h:22
@ RowFound
Definition DataTableFunctionLibrary.h:24
@ RowNotFound
Definition DataTableFunctionLibrary.h:26
Definition DataTable.h:37