title: Unable to merge actions producing... prerequisites are different
body: <p>In Unreal Engine 4, I was working on some c++ files as part of a game dev project when I was told that I hadn't updated the project on my computer properly, and needed to get the current files from the source control onto my computer's instance of the project to keep working. This required overwriting the c++ files, so I backed up the c++ files I made and re-implemented them after getting my project updated. When all was said and done, I got errors I've never seen before:</p>
  <p><code>ERROR: Unable to merge actions producing AICharacter.cpp.obj: prerequisites are different</code>
  <code>ERROR: Action graph is invalid; unable to continue. See log for details.</code></p>
  <p>I'm assuming this has something to do with my AICharacter source file, so I'll include it here:</p>
  <pre><code>#include &quot;AICharacter.h&quot;
  #include &quot;MainVillian.h&quot;
  #include &quot;Kismet/GameplayStatics.h&quot;
  
  // Sets default values
  AAICharacter::AAICharacter()
  {
      // Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
      PrimaryActorTick.bCanEverTick = true;
      
      //Init the box and audio comps
      BoxComp = CreateDefaultSubobject&lt;UBoxComponent&gt;(FName(&quot;BoxComp&quot;));
      BoxComp-&gt;AttachTo(GetRootComponent());
  
      AudioComp = CreateDefaultSubobject&lt;UAudioComponent&gt;(FName(&quot;AudioComp&quot;));
      AudioComp-&gt;AttachTo(GetRootComponent());
  
  }
  
  void AAICharacter::OnBoxOverlap(AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherIndex, bool bFromSweep, const FHitResult &amp; SweepResult)
  {
      if (OtherActor-&gt;IsA&lt;AMainVillian&gt;())
      {
          AMainVillian* Char = Cast&lt;AGV_ProjectCharacter&gt;(OtherActor);
          Char-&gt;SetTalkRangeStatus(true);
          Char-&gt;GeneratePlayerLines(*PlayerLines);
          Char-&gt;SetAssociatedPawn(this);
      }
  }
  
  void AMainVillian::OnBoxEndOverlap(AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherIndex)
  {
      if (OtherActor-&gt;IsA&lt;AMainVillian&gt;())
      {
          AMainVillian* Char = Cast&lt;AMainVillian&gt;(OtherActor);
          Char-&gt;SetTalkRangeStatus(false);
          Char-&gt;SetAssociatedPawn(nullptr);
      }
  }
  
  // Called when the game starts or when spawned
  void AAICharacter::BeginPlay()
  {
      Super::BeginPlay();
   
      //Register the begin and end overlap functions
      BoxComp-&gt;OnComponentBeginOverlap.AddDynamic(this, &amp;AAICharacter::OnBoxOverlapWrapper);
      BoxComp-&gt;OnComponentEndOverlap.AddDynamic(this, &amp;AAICharacter::OnBoxEndOverlapWrapper);
      
  }
  
  // Called every frame
  void AAICharacter::Tick(float DeltaTime)
  {
      Super::Tick(DeltaTime);
  
  }
  
  // Called to bind functionality to input
  void AAICharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
  {
      Super::SetupPlayerInputComponent(PlayerInputComponent);
  
  }
  
  void AAICharacter::Talk(USoundBase* SFX, TArray&lt;FSubtitle&gt; Subs)
  {
      AMainVillian* Char = Cast&lt;AMainVillian&gt;(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
  
      //Play the corresponding sfx
      AudioComp-&gt;SetSound(SFX);
      AudioComp-&gt;Play();
  
      //Tell the UI to update with the new subtitles
      Char-&gt;GetUI()-&gt;UpdateSubtitles(Subs);
  }
  
  void AAICharacter::AnswerToCharacter(FName PlayerLine, TArray&lt;FSubtitle&gt;&amp; SubtitlesToDisplay, float delay)
  {
      if (!AILines) return;
  
      //Retrieve the corresponding line
      FString ContextString;
      FDialogStruct* DialogStruct = AILines-&gt;FindRow&lt;FDialogStruct&gt;(PlayerLine, ContextString);
  
      AMainVillian* MainChar = Cast&lt;AMainVillian&gt;(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
  
      if (DialogStruct &amp;&amp; MainChar)
      {
          FTimerHandle TimerHandle;
          FTimerDelegate TimerDel;
  
          TimerDel.BindUFunction(this, FName(&quot;Talk&quot;), DialogStruct-&gt;SFX, DialogStruct-&gt;Subtitles);
  
          //Talk to the player after the delay time has passed
          GetWorld()-&gt;GetTimerManager().SetTimer(TimerHandle, TimerDel, delay, false);
      }
  }```
  </code></pre>