Hello!
I’m really enjoying this lesson
Looking at the UE4 documentation, UPROPERTY
allows you to specify various Metadata Specifiers that are really useful.
For example, in this lecture we expose the DoorCloseDelay
property to the editor. You can add a tooltip so you know what it is really doing like this:
UPROPERTY(EditAnywhere, meta=(ToolTip="The speed at which the door closes, in seconds."))
float DoorCloseDelay = 0.5f;
And in the editor:
Also, in this lecture Mike is changing the member variable named TargetYaw
to OpenAngle
(and renaming all occurrences of this variable in the .cpp file). Although it’s not exactly the same as renaming the variable in the code, you can expose a different name in the editor by using the DisplayName
metadata:
UPROPERTY(EditAnywhere, meta=(DisplayName="OpenAngle", Tooltip="Target angle - in degrees - when the door is fully opened."))
float TargetYaw = 90.f;
There are a lot of possible combinations, so be sure to check the documentation.