Download

'Build' in Visual Studio doesnt take, sometimes I have to click 'Compile' in Editor to see changes

Hi all.

I am quite new to UE4, but not completely new to programming or game development.

I am making a simple class which moves a camera from left to right. I try to make some small changes such as adding a UE_LOG message, or changing the direction in code. Normally I have been clicking ‘Build’ on the Solution Explorer ‘MyProject’ in VS2017. Suddenly (last night and today) this seems to not carry through to UE4. I get message in VS2017 ‘Build Succeeded’. But the code changes dont have any effect.

All I have to do to ‘fix’ the issue, is then ‘Compile’ in UE4 and the code changes all work as expected.

For testing, I tried not even clicking ‘Build’ in VS and this also works fine.

NB. I have been getting error in VS2017 ever since installing Unreal again. I posted here and Stack Overflow about it but I got no solid help with it. I don’t know if this is related but the error I get is when ‘Build’ in VS after it says: ’ E1574 static assertion failed with “TAtomic is only usable with trivial types” ’

From what I read I need to change Compliler settings to remove /Zp option. But all the details in links I found where outdated (https://docs.microsoft.com/en-us/cpp/build/reference/zp-struct-member-alignment?view=vs-2019 / c++ - Static assertion failed with "Windows headers require the default packing option..." - Stack Overflow )

Maybe you are building the wrong target in Visual Studio, maybe building Debug Game or Debug Game Editor instead of Development Editor?

thanks for your reply. Sadly I don’t think this is the case. In VS2017 I tried clicking ‘Build Solution’ (from the Build topdown menu) and the result is the same. I am a newbie though and havent had to change Visual Studio compiler/dependency settings for a long time (every time I’ve done it I just blindly follow developers tutorials on those parts)

According to this: https://forums.unrealengine.com/deve…n-this-command It is something to do with how I tagged variables with UPROPERTY()

So here is the code may shed light on why i get error :
Severity Code Description Project File Line Suppression State

Error MSB3075 The command ““C:\Program Files\Epic Games\UE_4.24\Engine\Build\BatchFiles\Build.bat” MyProjectEditor Win64 Development -Project=“C:_UNREAL_PROJECTS\repos\MyProject\MyProject.uproject” -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command. MyProject C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44

Severity Code Description Project File Line Suppression State
Error (active) E1574 static assertion failed with “TAtomic is only usable with trivial types” MyProject C:\Program Files\Epic Games\UE_4.24\Engine\Source\Runtime\Core\Public\Templates\Atomic.h 537


#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "CameraDirector.generated.h"

UCLASS()
class MYPROJECT_API ACameraDirector : public AActor
{
    GENERATED_BODY()

public:    
    // Sets default values for this actor's properties
    ACameraDirector();

    UPROPERTY(EditAnywhere) AActor* Camera1;

    UPROPERTY(EditAnywhere) AActor* Camera2;

    UPROPERTY(EditAnywhere) AActor* Camera3;


    float TimeToNextCameraChange;
    int CurrentCamera = 0;

protected:
    // Called when the game starts or when spawned
    virtual void BeginPlay() override;

public:    
    // Called every frame
    virtual void Tick(float DeltaTime) override;


};

Might be best to show the Output log not the error list.

I realise this thread is quite old but for the benefit of anyone getting the same error, "E1574 static assertion failed with “TAtomic is only usable with trivial types” this is an error from the intellisense system, not from the actual compile. At the top of the “Error List” window in VS 2017 and 2019 is a dropdown with options “Build+Intellisense” and “Build Only”. Change it to “Build Only” so you don’t see errors from intellsense