Last active
July 14, 2020 12:39
-
-
Save tmsampson/a2859500ad80af1cc23bfc5ef0c5742f to your computer and use it in GitHub Desktop.
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