Hiding UPROPERTY based on condition

Hi!

I would like to hide a property in the editor based on a certain condition. I’m aware that there is a meta information for UPROPERY (EditCondition) which can be used for disable editing.

Was wondering if there is something similar but to completly hide the property.

Thanks!

1 Like

no lucky?

wondering the reason that sth you can see but not able to edit…

Nope, there only EditCondition. At most you can do your own property editor customization:

It’s possible to use EditConditionHides now. If an edit condition fails, it will hide the UPROPERTY.

	// Whether the asteroid is considered a boss asteroid.
	UPROPERTY(EditDefaultsOnly, Category = "Asteroid | Boss")
	bool bIsBossAsteroid = false;

	// When the boss asteroid is destroyed, how many mid sized asteroids should be spawned?
	UPROPERTY(EditDefaultsOnly, Category = "Asteroid | Boss", meta = (EditCondition = "bIsBossAsteroid", EditConditionHides))
	uint8 BossNumberOfMidSizedAsteroidsToSpawn = 5;
12 Likes