Basically, I want to create a class that can Start, Stop, Pause/UnPause the Engine in code on my own. It would be similar to the |>, ||, and [ ] buttons in the Editor.
AGameMode and AGameState classes are responcble for this type of things which you can override. Aspecially your childs of AGameMode should have things related to your game modes, AGameState as i figured so far deals with pausing, so you dont need to override it actully to pause the game, you can do that from game mode which got pointer to instance of AGameState. Study them in API reference.
I don’t think AGameMode or AGameState is where it’s at. Based on what I’ve been researching in the code base, I’m thinking it may have something to do with UI_COMMAND.
For example: ( in DebuggerCommands.cpp )
UI_COMMAND( Simulate, “Simulate”, “Start simulating the game”, EUserInterfaceActionType::ToggleButton, FInputGesture( EKeys::S, EModifierKey::Alt ) );
UI_COMMAND( StopPlaySession, “Stop”, “Stop simulation”, EUserInterfaceActionType::Button, FInputGesture() );
I wonder if there is a way to find where these are being called, and then find the code that handles these so I can set it up in my own personal class.
Isnt this code for simulate button in editor? UI_COMMAND is macro that most likey registers UI element. Defenetly its something related AGameMode as it should control when game starts and ends and team scores and stuff like that, i just notived thares GameSession related to it
Theres also startgame and endgame in gamestate, i really thin you should dive to AGameMode and its relations
You could also find something in Uengine
Which instance is in gengine
Anyway maybe better tell what you want to do