Last active
July 14, 2020 12:39
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------------------------------------------------------ | |
// Basic Usage | |
//------------------------------------------------------------------------------------------------------------------------------ | |
UPROPERTY(EditAnywhere, Category="Demo") | |
bool MyFlag = true; | |
UPROPERTY(EditAnywhere, Category="Demo", meta=(EditCondition="MyFlag")) | |
int MyNumber = 0; | |
//------------------------------------------------------------------------------------------------------------------------------ | |
// Basic Usage (Inverted) | |
//------------------------------------------------------------------------------------------------------------------------------ | |
UPROPERTY(EditAnywhere, Category="Demo") | |
bool MyFlag = true; | |
UPROPERTY(EditAnywhere, Category="Demo", meta=(EditCondition="!MyFlag")) | |
int MyNumber = 0; | |
//------------------------------------------------------------------------------------------------------------------------------ | |
// Basic Usage (Hiding) | |
//------------------------------------------------------------------------------------------------------------------------------ | |
UPROPERTY(EditAnywhere, Category="Demo") | |
bool MyFlag = true; | |
UPROPERTY(EditAnywhere, Category="Demo", meta=(EditCondition="MyFlag", EditConditionHides)) | |
int MyNumber = 0; | |
//------------------------------------------------------------------------------------------------------------------------------ | |
// Advanced Usage (Enum) | |
//------------------------------------------------------------------------------------------------------------------------------ | |
UENUM(BlueprintType) | |
enum class EMovementConfig : uint8 | |
{ | |
ConstantSpeed, | |
Increment | |
}; | |
UPROPERTY(EditAnywhere, Category="Demo") | |
EMovementConfig MovementConfig = EMovementConfig::ConstantSpeed; | |
UPROPERTY(EditAnywhere, Category="Demo", meta=(EditCondition="MovementConfig == EMovementConfig::ConstantSpeed")) | |
float Speed = 10.0f; | |
UPROPERTY(EditAnywhere, Category = "Demo", meta = (EditCondition="MovementConfig == EMovementConfig::Increment")) | |
float Increment = 1.0f; | |
//------------------------------------------------------------------------------------------------------------------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment