The management class in game should be inherited from Uobject or Use traditional c++ class?

How much is the extra performance cost of Uobject? The management class in game should be inherited from Uobject to get garbage collection and memory management, or the traditional c++ class should be used to improve performance.

I would say Actor is the best choice, though it depends on what kind of game you are making.

  • If you inherit from Actor you get networking code for free along with some other things
  • If you inherit form a c++ class you must use the FGCObject interface to hold references to other UObjects and this can introduce very hard to reach bugs
  • If you create your manager as a c++ class you wont be able to use it directly in blueprints which may be useful for UI even if you plan to write the game code in c++

I think the key point to this is the 80/20 rule (80% of your optimisations come from 20% of your code) - I personally don’t think the tiny optimisation would be worth all the bugs and issues arising from it. If you are truly concerned setup profiling using unreal’s SCOPED_CYCLE_COUNTER macro and measure the performance difference but I would bet now that it is negligible.

Thank For Your Advice