Regardless of where I put this line of code…
GetOwner()->FindComponentByClass()->SetCollisionResponseToChannel(ECC_CoinObject, ECR_Ignore);
the editor crashes on me. Essentially, I’m trying to tell the player to ignore the coin in the game when it collides with it. I call this line of code when the player overlaps with the coin. I call a simple collect animation on the coin when the player collides with it. I also play a 2D sound and add points to the player’s score, but when the coin is still in the middle of its animation, the player can still collect it (replaying the sound and adding too much to the score), so I thought telling the player to ignore the coin would stop this, yet I still get crashes. I also get crashes when I do it the other way around (telling the collided coin to ignore pawn). Any suggestions?