When developing with Unreal, it is common for programmers to implement properties on Actors or other objects in C++, and make them visible to the editor for designer use. However, sometimes it makes sense to view a property, or to make it editable, but only on the object's default state. Sometimes the property should only be modifiable at runtime with the default specified in C++. Fortunately, there are some specifiers that can help us restrict when a property is available.
Create a new
Actor
class in the editor calledPropertySpecifierActor
.Add the following property definitions to the class:
UPROPERTY(EditDefaultsOnly) bool EditDefaultsOnly; UPROPERTY(EditInstanceOnly) bool EditInstanceOnly; UPROPERTY(EditAnywhere) bool EditAnywhere; UPROPERTY(VisibleDefaultsOnly) bool VisibleDefaultsOnly; UPROPERTY(VisibleInstanceOnly) bool VisibleInstanceOnly; UPROPERTY(VisibleAnywhere) bool VisibleAnywhere;
Compile your code and launch...