in the following code i have not defined ‘NOEXTRA’. so ‘PropertyFloat’ should be seen in editor but does not.
why?
UCLASS()
class BATTERYCOLLECTOR_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
#ifndef NOEXTRA
UPROPERTY(EditAnywhere)
float PropertyFloat;
#endif
};
After testing I found that #ifdef / #ifndef do appear to work inside the source file without issue, there just seems to be an issue with using it in the header file. I entered a bug report for the #ifndef not having an affect on the UPROPERTY showing in the editor (UE-28516).