Well, can you please help … I import csv file,to engine. Make a new C++ class from DataTable , include in .h file of my another class and declare variable of it.
How can I iterate through the values thou? …
pragma once
#include "CoreMinimal.h"
#include "Engine/DataTable.h"
#include "FItemInformation.generated.h"
/**
*
*/
USTRUCT(BlueprintType)
struct FItemInformation : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
public:
FItemInformation() {
}
UPROPERTY(EditAnywhere)
FText itemNumber;
UPROPERTY(EditAnywhere)
FText xpos;
UPROPERTY(EditAnywhere)
FText ypos;
UPROPERTY(EditAnywhere)
FText zpos;
UPROPERTY(EditAnywhere)
FText xrot;
UPROPERTY(EditAnywhere)
FText yrot;
UPROPERTY(EditAnywhere)
FText zrot;
UPROPERTY(EditAnywhere)
FText itemType;
UPROPERTY(EditAnywhere)
FText option01;
UPROPERTY(EditAnywhere)
FText option02;
UPROPERTY(EditAnywhere)
FText option03;
};
UCLASS()
class NETWORKDIRECT_API UFItemInformation : public UDataTable
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
FItemInformation ItemInformation;
void test();
};
another class .h
FItemInformation* ItemData;
another class .cpp
if (ItemData != nullptr) {
for (auto it : ItemData)
{
////// ????
}
}
Also, not sure how to implement the test() function. Seems not comes up from suffix “.” or"->" either …