FragCastle
(FragCastle)
December 9, 2019, 7:39am
1
Hey guys,
I have a problem with my packaged build. In Editormode all works fine but the build crashes at the start. I defined a UStruct in C++ an created a Table in Editor from it.
In C++ I´m loading the Table by reference and want to use it. But the build crashes with a Unhandles Exception after trying to access the table.
FTab_EgoVeh_De* EgoVehicleConfigItem;
const FString TAB_EGO_CONFIG = FString("DataTable'/Game/Tables/Tab_EgoVeh2.Tab_EgoVeh2'");
auto FEgoVEHRef = Cast<UDataTable>(StaticLoadObject(UDataTable::StaticClass(), NULL, *TAB_EGO_CONFIG));
if (FEgoVEHRef) {
const FString contextString = "";
//Get requested data from table
EgoVehicleConfigItem = FEgoVEHRef->FindRow<FTab_EgoVeh_De>((FName)*carModelName, contextString);
PoseableMeshComponent->SetRelativeLocation(EgoVehicleConfigItem->RelativeOffset);
}
Struct:
USTRUCT(BlueprintType)
struct FTab_EgoVeh_De : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere)
UBlueprint* url_dashboard;
UPROPERTY(EditAnywhere)
UBlueprint* url_led;
UPROPERTY(EditAnywhere)
FVector RelativeOffset;
UPROPERTY(EditAnywhere)
FVector RearWindowReflectOffset;
UPROPERTY(EditAnywhere)
bool bRadioTest;
UPROPERTY(EditAnywhere)
bool bMirrorIssue;
UPROPERTY(EditAnywhere)
FString WipersMesh;
UPROPERTY(EditAnywhere)
FString WipersAnimation;
UPROPERTY(EditAnywhere)
bool HeadupUI_Speed;
UPROPERTY(EditAnywhere)
UBlueprint* WidgetUISpeed;
};
What must I do to make this runnable in a packaged version?