I learned that the actors belong to the level, so I want to create non-actor objects. because I want my objects never to destroy. The Objects I’ll create must not have SceneComponent. They’re not actor, only the objects I will use to manage the whole game. I want to create something out of the game world.
I usually don’t prefer to use GameFramework(GameMode etc.) and Blueprint.
For example, I’ll tell GameManager to load LoginLevel, when the game is loaded for the first time
class ClientManager : UObject
{
CLASS_NAME _myNetwork; // my network library (using winsock/berkeley sockets)
// To connect to server,create clients .. ...
}
class MapManager : UObject
{
MAP_OBJECT // holds NPCs, Characters in level.
LoadLevel(); UnloadLevel();
}
class GameManager : UObject{ // It will store some game information and has some functions...}
When press the login button in the Login Level or a player is in teleportation zone in xxx_level, the loadmap function will be called.
Also I want my objects to have functions like tick, beginplay.
Let me briefly summarize the life cycle I want to create,
Engine->Call my objects functons->Call level actors functions
If these are impossible, could you give me alternative ways and advices?