在UE的C++编程中,通常使用UPROPERTY(EditAnywhere)宏将属性公开给UE编辑器,使得可以在UE编辑器中对这些属性进行修改,避免了多次编译的繁琐,这个宏也有一些说明符,不同的含义
UPROPERTY(EditAnywhere) int32 TotalDamage;
UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 TotalDamage;
UPROPERTY(EditAnywhere, VisibleAnywhere, Transient, Category = "伤害") int32 TotalDamage;
UPROPERTY(EditAnywhere, Category = "伤害") int32 TotalDamage;