Added delegates and automatic switching
This commit is contained in:
parent
d4ac87e36d
commit
16061e077b
5 changed files with 263 additions and 44 deletions
|
@ -14,25 +14,29 @@ enum class EConfigValueType : uint8
|
|||
String
|
||||
};
|
||||
|
||||
/**
|
||||
* Note: In Blueprints, all values will be visible, but only the value corresponding to the 'Type' will be used.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct FHLConfigValue
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
private:
|
||||
UPROPERTY(EditAnywhere, Category="ConfigValue")
|
||||
// Allow Blueprint access to these private variables
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ConfigValue", meta = (AllowPrivateAccess = "true"))
|
||||
EConfigValueType Type;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="ConfigValue")
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ConfigValue", meta = (AllowPrivateAccess = "true", EditCondition = "Type == EConfigValueType::Int", EditConditionHides))
|
||||
int32 IntValue;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="ConfigValue")
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ConfigValue", meta = (AllowPrivateAccess = "true", EditCondition = "Type == EConfigValueType::Float", EditConditionHides))
|
||||
float FloatValue;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="ConfigValue")
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ConfigValue", meta = (AllowPrivateAccess = "true", EditCondition = "Type == EConfigValueType::Bool", EditConditionHides))
|
||||
bool BoolValue;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="ConfigValue")
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ConfigValue", meta = (AllowPrivateAccess = "true", EditCondition = "Type == EConfigValueType::String", EditConditionHides))
|
||||
FString StringValue;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue