Hey!
In my projectile class I use a function that is fired by the projectile movement component OnProjectileHit delegate.
It looks like this:
void ABullet::OnHit(const FHitResult& ImpactResult, const FVector& ImpactVelocity)
{
GEngine->AddOnScreenDebugMessage(18, 2, FColor::Black, FString::SanitizeFloat(ImpactVelocity.Size()));
if (ImpactResult.Component.IsValid())
{
ImpactResult.Component->AddForceAtLocation(ImpactVelocity, ImpactResult.Location, "None");
}
if (ImpactResult.Actor.IsValid())
{
}
}
When the event fires the ‘ImpactResult.Actor.IsValid()’ part is executed the engine will crash with the following error message:
“[Index:1156885606] exceeds maximum number of UObjects, [Block:70610] increase MAX_SERIAL_NUMBER_BLOCKS”
I know that it is this part, because when I comment it out the engine won’t crash any longer.
I don’t know why this is happening, and refering to this thread it should be right like I did that.
So any help is appreciated, thanks!