Why character class is more optimized than pawn?

There’s something weird I have recently noticed.

Character inherits from pawn, so logically, pawns should be more lighter, but it’s not…

Here are the steps to reproduce the issue…

  1. Open up a new [Third Person] template.
  2. Place 100 characters (default mannequins) in the level.
  3. Run in PIE, result is 120 fps.
  4. Now, re-parent the same BP to [Pawn] class.
  5. Add a [Skeletal Mesh] (instead of character) and choose to use the default mannequin (don’t forget to set an Anim BP).
  6. Run again, result is 20 fps.

What am I missing?

I reproduced steps in 4.24 in my test pawn gave more fps than character class as expected. But I did not reparent the class. Instead, I make two different classes for pawn and character.

I think the issue is in blueprints. Native code runs a lot faster than BPs, and adding components directly in the BP takes its tall.

For purity, this experiment should be conducted with custom C++ classes inherited from APawn and ACharater.

It isn’t inheritance, pawns are lighter than characters. Reparenting is what is causing the issue you’re talking about.

Don’t reparent. Make the BP using Pawns, and again using Characters.
You’ll find the impact is the reverse of what you’ve been getting.