Pause When Action Pressed

I've noticed that once a scene has loaded, the first time you press the action / interact button, there is a significant pause in gameplay before continuing as normal. It only does it for the first time the button is pressed, but it is certainly noticeable.
 
This has always been the case dating back to the first UFPS--years back. I wonder how to counteract it in a project? I would hate to have a game that stuttered the first time the "fire" button is pressed. Maybe there is some way to "pre-fire" or "pre-interact"? Perhaps the pause is due to a bunch of stuff instantiating or initializing all at once? I don't know code, so I am speculating. But this has always happened for some reason.
 
This has always been the case dating back to the first UFPS--years back. I wonder how to counteract it in a project? I would hate to have a game that stuttered the first time the "fire" button is pressed. Maybe there is some way to "pre-fire" or "pre-interact"? Perhaps the pause is due to a bunch of stuff instantiating or initializing all at once? I don't know code, so I am speculating. But this has always happened for some reason.

Indeed, maybe there is some way Justin could fix it in a future version, where the ability is automatically activated as part of scene initialisation or something. It's a strange one.
 
On the Object Pool you can specify which objects should be prespawned and that will instantiate the objects and pool the object ahead of time.
 
On the Object Pool you can specify which objects should be prespawned and that will instantiate the objects and pool the object ahead of time.

Not sure how this would work for the action button though? Which objects would need to be prespawned? The character?
 
Top