Hello,
I been converting my blueprints over to c++ but I seem to have an issue where I trying set values of one of the tables defaults when I pulling another table into linked table object.
here in my code for the padding:
#pragma once
#include "Engine/DataTable.h"
#include "CreditsPaddingMargin.generated.h"
USTRUCT(BlueprintType)
struct FCreditsPaddingMargin : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
public:
FCreditsPaddingMargin()
: Left(0.0f)
, Top(0.0f)
, Right(0.0f)
, Bottom(0.0f)
{}
/** reference to the left margin. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Credits)
float Left;
/** reference to the top margin. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Credits)
float Top;
/** reference to the right margin. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Credits)
float Right;
/** reference to the bottom margin. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Credits)
float Bottom;
};
but what I trying to accomplish in my textobject DataTable is change the default value of the FCreditsPaddingMargin::Bottom to the value of 10.0 as you would using the blueprint structs method.
here is my code for NameTextObject
#pragma once
#include "Engine/DataTable.h"
#include "CreditsTextProperties.h"
#include "CreditsImageProperties.h"
#include "CreditsPaddingMargin.h"
#include "CreditsNameTextObject.generated.h"
USTRUCT(BlueprintType)
struct FCreditsNameTextObject : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
public:
FCreditsNameTextObject()
: TextProperties()
, ImageProperties()
, Padding() // @TODO need fix 10.0 default in Padding Bottom
{}
/** reference to the text properties. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Credits)
FCreditsTextProperties TextProperties;
/** reference to the image properties. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Credits)
FCreditsImageProperties ImageProperties;
/** reference to the padding. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Credits)
FCreditsPaddingMargin Padding;
};
in the reference too FCreditsPaddingMargin Padding; I need change the variable of the Bottom Padding to 10.0.
I have tried using vector style in Padding() using floats. as I still new to this. how can I create the FCreditsPaddingMargin::Bottom = 10.0; in this table.
any information that can help would be great. i looked all over the engine source code for ideas how to achieve this but I cant seem to find anything that seems to help.
Thanks for reading my post.
Stephen