Create a new class

Instead of adding all the Online Subsystem code in GameInstance Class, why can’t we create a new class and add it to a function there and call in the Init of GameInstance class?

It may well be possible but would this perhaps complicate the code? In larger developments it would be sensible or even necessary however.

One of the good things about the code is the GameInstance is easy to find and applies throughout the game. Wrapping in a class could possibly work if you got the instance, got the class (checks for null each time) and then called the class directly.

1 Like

Thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms