Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine
Inheritance Hierarchy
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/DataTable.h |
Include | #include "Engine/DataTable.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, AutoExpandCategories="DataTable,ImportOptions",
Meta=(LoadBehavior="LazyOnDemand"))
class UDataTable : public UObject
Remarks
Imported spreadsheet table.
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
TObjectPtr< class UAssetImportData > | AssetImportData | The file this data table was imported from, may be empty |
![]() ![]() ![]() |
uint8: 1 | bIgnoreExtraFields | Set to true to ignore extra fields in the import data, if false it will warn about them |
![]() ![]() ![]() |
uint8: 1 | bIgnoreMissingFields | Set to true to ignore any fields that are expected but missing, if false it will warn about them |
![]() ![]() ![]() |
uint8: 1 | bPreserveExistingValues | Set to true to preserve existing values for any fields that are expected but missing in the CSV file. |
![]() ![]() ![]() |
uint8: 1 | bStripFromClientBuilds | Set to true to not cook this data table into client builds. |
![]() |
friend | FDataTableEditorUtils | |
![]() |
friend | FDataTableImporterCSV | |
![]() |
friend | FDataTableImporterJSON | |
![]() ![]() ![]() |
FString | ImportKeyField | Explicit field in import data to use as key. |
![]() |
TMap< FName, uint8 * > | RowMap | Map of name of row to row data structure. |
![]() ![]() ![]() |
TArray< uint8 > | RowsSerializedWithTags | When RowStruct is being modified, row data is stored serialized with tags |
![]() ![]() ![]() ![]() |
TObjectPtr< UScriptStruct > | RowStruct | Structure to use for each row of the table, must inherit from FTableRowBase |
![]() ![]() |
FTopLevelAssetPath | RowStructPathName | The name of the RowStruct we were using when we were last saved |
![]() ![]() ![]() |
TSet< TObjectPtr< UObject > > | TemporarilyReferencedObjects | |
![]() |
friend | UGameplayTagTableManager |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UDataTable
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | AddReferencedObjects
(
UObject* InThis, |
|
![]() ![]() |
void | AddRow
(
FName RowName, |
|
![]() ![]() |
void | AddRow
(
FName RowName, |
Copies RowData into table. |
![]() ![]() |
void | AddRowInternal
(
FName RowName, |
Called to add rows to the data table |
![]() ![]() ![]() |
bool | Returns true if it is valid to import multiple table rows with the same name; returns false otherwise | |
![]() ![]() |
void | ||
![]() |
bool | CopyImportOptions
(
UDataTable* SourceTable |
Copies all the import options from another table, this does not copy row dawta |
![]() |
TArray< FString > | CreateTableFromCSVString
(
const FString& InString |
Create table from CSV style comma-separated string. |
![]() |
TArray< FString > | CreateTableFromJSONString
(
const FString& InString |
Create table from JSON style string. RowStruct must be defined before calling this function. |
![]() |
TArray< FString > | CreateTableFromOtherTable
(
const UDataTable* InTable |
Create table from another Data Table |
![]() |
TArray< FString > | CreateTableFromRawData
(
TMap< FName, const uint8* >& DataMap, |
Create table from a raw data map with a given script struct |
![]() ![]() |
void | EmptyTable () |
Empty the table info (will not clear RowStruct) |
![]() ![]() |
T * | ||
![]() ![]() |
T * | Function to find the row of a table given its name. | |
![]() ![]() |
uint8 * | FindRowUnchecked
(
FName RowName |
High performance version with no type safety |
![]() ![]() |
FProperty * | FindTableProperty
(
const FName& PropertyName |
Returns the column property where PropertyName matches the name of the column property. |
![]() ![]() |
void | ForeachRow
(
const FString& ContextString, |
|
![]() ![]() |
void | ForeachRow
(
const TCHAR* ContextString, |
Perform some operation for every row. |
![]() ![]() |
void | GetAllRows
(
const FString& ContextString, |
|
![]() ![]() |
void | GetAllRows
(
const TCHAR* ContextString, |
Get all of the rows in the table, regardless of name |
![]() ![]() |
TArray< FString > | Get an array of all the column titles, using the friendly display name from the property | |
![]() ![]() |
UScriptStruct & | ||
![]() ![]() |
TMap< FName, uint8 * > & | TODO: remove this, it is temporarily here to allow DataTableEditorUtils to compile until I get around to updating functions like RemoveRow and RenameRow. | |
![]() ![]() ![]() |
const TMap< FName, uint8 * > & | GetRowMap () |
|
![]() ![]() |
const TMap< FName, uint8 * > & | GetRowMap () |
|
![]() ![]() |
TArray< FName > | GetRowNames () |
|
![]() ![]() |
const UScriptStruct * | GetRowStruct () |
|
![]() ![]() |
FName | ||
![]() ![]() |
FTopLevelAssetPath | ||
![]() ![]() |
FString | GetTableAsCSV
(
const EDataTableExportFlags InDTExportFlags |
Output entire contents of table as CSV |
![]() ![]() |
FString | GetTableAsJSON
(
const EDataTableExportFlags InDTExportFlags |
Output entire contents of table as JSON |
![]() ![]() |
FString | GetTableAsString
(
const EDataTableExportFlags InDTExportFlags |
Output entire contents of table as a string |
![]() ![]() |
TArray< TArray< FString > > | GetTableData
(
const EDataTableExportFlags InDTExportFlags |
Get array for each row in the table. The first row is the titles |
![]() |
TArray< FProperty * > | Get array of UProperties that corresponds to columns in the table | |
![]() ![]() |
TArray< FString > | Get an array of all the column titles, using the unique name from the property | |
![]() |
void | HandleDataTableChanged
(
FName ChangedRowName |
Call whenever the data of a table has changed, this calls the OnDataTableChanged() delegate and per-row callbacks. |
![]() |
void | LoadStructData
(
FStructuredArchiveSlot Slot |
|
![]() |
FOnDataTableChanged & | Gets a multicast delegate that is called any time the data table changes. | |
![]() |
void | OnPostDataImported
(
OUTTArray< 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 |
![]() ![]() |
void | Removes a single row from the DataTable by name. Just returns if row is not found. | |
![]() ![]() |
void | RemoveRowInternal
(
FName RowName |
Deletes the row memory |
![]() ![]() |
void | ||
![]() |
void | SaveStructData
(
FStructuredArchiveSlot Slot |
|
![]() ![]() |
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 |
![]() ![]() |
bool | WriteTableAsJSON
(
const TSharedRef< TJsonWriter< CharType, TPrettyJsonPrintPolicy< CharType > > >& JsonWriter, |
Output entire contents of table as JSON |
![]() ![]() |
bool | WriteTableAsJSONObject
(
const TSharedRef< TJsonWriter< CharType, TPrettyJsonPrintPolicy< CharType > > >& JsonWriter, |
Output entire contents of table as a JSON Object |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Called to finish destroying the object. | |
![]() ![]() ![]() |
void | GetAssetRegistryTags
(
TArray< FAssetRegistryTag >& OutTags |
|
![]() ![]() ![]() |
void | GetAssetRegistryTags
(
FAssetRegistryTagsContext Context |
Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects |
![]() ![]() |
void | GetPreloadDependencies
(
TArray< UObject* >& OutDeps |
Called during cooking. |
![]() ![]() |
void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). |
![]() ![]() ![]() |
EDataValidationResult | IsDataValid
(
FDataValidationContext& Context |
Generic function to validate objects during changelist validations, etc. |
![]() ![]() ![]() |
bool | Called during saving to determine the load flags to save with the object. | |
![]() ![]() ![]() |
bool | Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. | |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
![]() ![]() |
void | Serialize
(
FStructuredArchiveRecord Record |
|
![]() ![]() ![]() |
void | ThreadedPostLoadAssetRegistryTagsOverride
(
FPostLoadAssetRegistryTagsContext& Context |
Performs fixup on loaded asset registry data. |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FScopedDataTableChange | Used to trigger the data table changed delegate. |
Typedefs
Name | Description |
---|---|
FOnDataTableChanged | |
FOnDataTableImport |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FString | ImportPath_DEPRECATED | The filename imported to create this object. |
![]() ![]() |
FName | RowStructName_DEPRECATED | The name of the RowStruct we were using when we were last saved |