Navigation
API > API/Runtime > API/Runtime/Engine
Imported spreadsheet table.
| Name | UDataTable |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/DataTable.h |
| Include Path | #include "Engine/DataTable.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, AutoExpandCategories="DataTable,ImportOptions",
Meta=(LoadBehavior="LazyOnDemand"))
class UDataTable : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UDataTable
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UDataTable
(
const FObjectInitializer& ObjectInitializer |
Engine/DataTable.h |
Structs
| Name | Remarks |
|---|---|
| FScopedDataTableChange | Used to trigger the data table changed delegate. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnDataTableChanged | TMulticastDelegate_NoParams< void > | Engine/DataTable.h | |
| FOnDataTableImport | TMulticastDelegate_NoParams< void > | Engine/DataTable.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AssetImportData | TObjectPtr< class UAssetImportData > | The file this data table was imported from, may be empty | Engine/DataTable.h |
|
| bIgnoreExtraFields | uint8 | Set to true to ignore extra fields in the import data, if false it will warn about them | Engine/DataTable.h |
|
| bIgnoreMissingFields | uint8 | Set to true to ignore any fields that are expected but missing, if false it will warn about them | Engine/DataTable.h |
|
| bPreserveExistingValues | uint8 | Set to true to preserve existing values for any fields that are expected but missing in the CSV file. | Engine/DataTable.h |
|
| bStripFromClientBuilds | uint8 | Set to true to not cook this data table into client builds. | Engine/DataTable.h |
|
| FDataTableEditorUtils | friend | Engine/DataTable.h | ||
| FDataTableImporterCSV | friend | Engine/DataTable.h | ||
| FDataTableImporterJSON | friend | Engine/DataTable.h | ||
| ImportKeyField | FString | Explicit field in import data to use as key. | Engine/DataTable.h |
|
| RowStruct | TObjectPtr< UScriptStruct > | Structure to use for each row of the table, must inherit from FTableRowBase | Engine/DataTable.h |
|
| RowStructPathName | FTopLevelAssetPath | The name of the RowStruct we were using when we were last saved | Engine/DataTable.h | |
| UGameplayTagTableManager | friend | Engine/DataTable.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnDataTableChangedDelegate | FOnDataTableChanged | A multicast delegate that is called any time the data table changes. | Engine/DataTable.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddRow
(
FName RowName, |
Engine/DataTable.h | ||
virtual void AddRow
(
FName RowName, |
Copies RowData into table. | Engine/DataTable.h | |
virtual bool AllowDuplicateRowsOnImport() |
Returns true if it is valid to import multiple table rows with the same name; returns false otherwise | Engine/DataTable.h | |
virtual void CleanBeforeStructChange() |
Engine/DataTable.h | ||
bool CopyImportOptions
(
UDataTable* SourceTable |
Copies all the import options from another table, this does not copy row dawta | Engine/DataTable.h | |
TArray< FString > CreateTableFromCSVString
(
const FString& InString |
Create table from CSV style comma-separated string. | Engine/DataTable.h | |
TArray< FString > CreateTableFromJSONString
(
const FString& InString |
Create table from JSON style string. RowStruct must be defined before calling this function. | Engine/DataTable.h | |
TArray< FString > CreateTableFromOtherTable
(
const UDataTable* InTable |
Create table from another Data Table | Engine/DataTable.h | |
TArray< FString > CreateTableFromRawData
(
TMap< FName, const uint8* >& DataMap, |
Create table from a raw data map with a given script struct | Engine/DataTable.h | |
virtual void EmptyTable() |
Empty the table info (will not clear RowStruct) | Engine/DataTable.h | |
| Engine/DataTable.h | |||
| Function to find the row of a table given its name. | Engine/DataTable.h | ||
uint8 * FindRowUnchecked
(
FName RowName |
High performance version with no type safety | Engine/DataTable.h | |
FProperty * FindTableProperty
(
const FName& PropertyName |
Returns the column property where PropertyName matches the name of the column property. | Engine/DataTable.h | |
void ForeachRow
(
const FString& ContextString, |
Engine/DataTable.h | ||
void ForeachRow
(
const TCHAR* ContextString, |
Perform some operation for every row. | Engine/DataTable.h | |
void GetAllRows
(
const FString& ContextString, |
Engine/DataTable.h | ||
void GetAllRows
(
const TCHAR* ContextString, |
Get all of the rows in the table, regardless of name | Engine/DataTable.h | |
TArray< FString > GetColumnTitles() |
Get an array of all the column titles, using the friendly display name from the property | Engine/DataTable.h | |
| Engine/DataTable.h | |||
| Engine/DataTable.h | |||
| Engine/DataTable.h | |||
const UScriptStruct * GetRowStruct() |
Engine/DataTable.h | ||
FTopLevelAssetPath GetRowStructPathName() |
Engine/DataTable.h | ||
FString GetTableAsCSV
(
const EDataTableExportFlags InDTExportFlags |
Output entire contents of table as CSV | Engine/DataTable.h | |
FString GetTableAsJSON
(
const EDataTableExportFlags InDTExportFlags |
Output entire contents of table as JSON | Engine/DataTable.h | |
FString GetTableAsString
(
const EDataTableExportFlags InDTExportFlags |
Output entire contents of table as a string | Engine/DataTable.h | |
TArray< TArray< FString > > GetTableData
(
const EDataTableExportFlags InDTExportFlags |
Get array for each row in the table. The first row is the titles | Engine/DataTable.h | |
| Get array of UProperties that corresponds to columns in the table | Engine/DataTable.h | ||
TArray< FString > GetUniqueColumnTitles() |
Get an array of all the column titles, using the unique name from the property | Engine/DataTable.h | |
void HandleDataTableChanged
(
FName ChangedRowName |
Call whenever the data of a table has changed, this calls the OnDataTableChanged() delegate and per-row callbacks. | Engine/DataTable.h | |
FOnDataTableChanged & OnDataTableChanged() |
Gets a multicast delegate that is called any time the data table changes. | Engine/DataTable.h | |
virtual void RemoveRow
(
FName RowName |
Removes a single row from the DataTable by name. Just returns if row is not found. | Engine/DataTable.h | |
virtual void RestoreAfterStructChange() |
Engine/DataTable.h | ||
bool WriteRowAsJSON
(
const TSharedRef< TJsonWriter< CharType, TPrettyJsonPrintPolicy< CharType > > >& JsonWriter, |
Output the fields from a particular row (use RowMap to get RowData) to an existing JsonWriter | Engine/DataTable.h | |
bool WriteTableAsJSON
(
const TSharedRef< TJsonWriter< CharType, TPrettyJsonPrintPolicy< CharType > > >& JsonWriter, |
Output entire contents of table as JSON | Engine/DataTable.h | |
bool WriteTableAsJSONObject
(
const TSharedRef< TJsonWriter< CharType, TPrettyJsonPrintPolicy< CharType > > >& JsonWriter, |
Output entire contents of table as a JSON Object | Engine/DataTable.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void FinishDestroy() |
Engine/DataTable.h | ||
virtual void GetAssetRegistryTags
(
TArray< FAssetRegistryTag >& OutTags |
Engine/DataTable.h | ||
virtual void GetAssetRegistryTags
(
FAssetRegistryTagsContext Context |
Engine/DataTable.h | ||
| Engine/DataTable.h | |||
virtual void GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Engine/DataTable.h | ||
virtual EDataValidationResult IsDataValid
(
FDataValidationContext& Context |
Engine/DataTable.h | ||
virtual bool NeedsLoadForClient() |
Engine/DataTable.h | ||
virtual bool NeedsLoadForEditorGame() |
Engine/DataTable.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Engine/DataTable.h | ||
virtual void PostInitProperties() |
Engine/DataTable.h | ||
virtual void PostLoad() |
Engine/DataTable.h | ||
virtual void Serialize
(
FStructuredArchiveRecord Record |
Engine/DataTable.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddRowInternal
(
FName RowName, |
Called to add rows to the data table | Engine/DataTable.h | |
UScriptStruct & GetEmptyUsingStruct() |
Engine/DataTable.h | ||
| TODO: remove this, it is temporarily here to allow DataTableEditorUtils to compile until I get around to updating functions like RemoveRow and RenameRow. | Engine/DataTable.h | ||
void LoadStructData
(
FStructuredArchiveSlot Slot |
Engine/DataTable.h | ||
void OnPostDataImported
(
TArray< FString >& OutCollectedImportProblems |
Called whenever new data is imported into the data table via CreateTableFrom*; Alerts each imported row and gives the row struct a chance to operate on the imported data | Engine/DataTable.h | |
virtual void RemoveRowInternal
(
FName RowName |
Deletes the row memory | Engine/DataTable.h | |
void SaveStructData
(
FStructuredArchiveSlot Slot |
Engine/DataTable.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ThreadedPostLoadAssetRegistryTagsOverride
(
FPostLoadAssetRegistryTagsContext& Context |
Engine/DataTable.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Engine/DataTable.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ImportPath_DEPRECATED | FString | The filename imported to create this object. | Engine/DataTable.h | |
| RowStructName_DEPRECATED | FName | The name of the RowStruct we were using when we were last saved | Engine/DataTable.h |