I have a debug build of my app and a shipping build. During debug & development, I want to use one particular default path. In the deployed version of my app, I want to use a different default path. I am too lazy to go back and change my defaults every time I switch between debug and shipping (and I want to avoid forgetting and human error), so I decided it would be a good idea to wrap it in a pre-processor. However, the UE4 build tool doesn’t like it when I put UPROPERTY inside of a pre-processor. I tried to be clever by moving it outside, but it doesn’t work. Am I relegated to commenting and uncommenting every time I switch between builds?!
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Settings") #if !UE_BUILD_SHIPPING FString DataDir = TEXT("C:\\Imagery_data\\"); #else FString DataDir = TEXT("Y:\\"); #endif