So, I have setup a DataTable for a dialogue system using the following code:
#pragma once
#include "DialogueDataTable.generated.h"
/**
*
*/
USTRUCT(BlueprintType)
struct FDialogueTableRow : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dialogue)
TAssetPtr<USoundWave> Wav;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dialogue)
FString Text;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dialogue)
FName UI_Index_1;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dialogue)
FName UI_Index_2;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dialogue)
FName UI_Index_3;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dialogue)
FName UI_Index_4;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dialogue)
FName Next_Line;
};
class AA_BLANK_TESTENVIRON_API DialogueDataTable
{
public:
DialogueDataTable();
~DialogueDataTable();
};
And am able to import the my csv file (made within Excel and exported as a comma delimited .csv) without any problems. I can’t attach the file unfortunately, but here’s an image of the DataTable correctly formatted within UE4.
I’m using the DataTable to specify SoundWaves so that I can switch dialogue based on user input / game events. So am using
TAssetPtr<USoundWave> Wav;
within the C++ code to enable me to store the path for various soundfiles in the .csv. This is done as (right-clicking the asset and copying the reference):
“SoundWave’/Game/Audio/Dialogue/A0001_You_Seek_the_Branch.A0001_You_Seek_the_Branch’”
My initial BluePrint system system works as it should and the file path is passed to the Set Wave Parameter node and the correct SoundWave is played.
However, when I re-open the project the connection between the Get Data Table Row node and the Break Table Row has been lost and when I try and re-connect I get an error pop-up (“Only exacting matching structures are considered compatible”).
If I delete the Break Table Row node and try and re-create it by dragging from the Out Row output of the Get Data Table Row node the Break Table Row is not available (using context sensitive) until I re-associate the imported DataTable with the Get Data Table Row node.
Even when I re-create the Get Data Table Row, the system does not work as the output of the node, which previously returned the file path of the SoundWave now returns “None”.
When I double-click on the DataTable in the Content Browser the contents have changed!
Before the entry that contained the file path read /Game/Audio/Dialogue/A0001_You_Seek_the_Branch.A0001_You_Seek_the_Branch it now reads SoundWave’/Game/Audio/Dialogue/A0001_You_Seek_the_Branch.A0001_You_Seek_the_Branch’.
I have not made any changes to the .csv file. And this occurs if I close UE4 and immediately re-open.
Re-importing the .csv file doesn’t work as it still displays the file path as SoundWave/Game/…
If I delete the DataTable from the Content Browser and then copy all of the file references from UE4 back into the .csv and then import this back in, everything will work again - that is until I close and re-open the project.
Hopefully that all makes sense?
Can anyone suggest any reasons for this or how I might resolve this issue?