Download

Destroy decals spawned by AActor

I have an AActor derived class that calls UGameplayStatics::SpawnDecalAtLocation from its OnConstruction function. Whenever I reload my code, it spawns an additional decal and leaves the old one in the scene! How do I destroy this decal before my actor is reloaded, such that I don’t get these orphaned decals…? (Where do I detect the change happening so I can call DestroyComponent)