I’ve written a GridDriver class that instantiates an object of type CustomGrid which is a TArray of CustomPoint Structs which are FVectors + a boolean, but I don’t know where I will call it from within my game to let it do it’s work.
With the tutorialGame code downloaded after watching the tutorial series beginning with this video: - YouTube, there is a file called TutorialCode.cpp that has this as it’s only line: IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, TutorialCode, “TutorialCode” )
Similarly, my base game file that I am working with has this as it’s only line: IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, GameName, “GameName” );
Does the engine know to automatically look for things prefixed by the string set here (GameName for my example, TutorialCode for the video’s)?
How does IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, GameName, “GameName” ); work?
For example, to match TutorialCode there is TutorialCodeCharacter.cpp, TutorialCodeGameMode.cpp, and TutorialCodeHUD.cpp, but I don’t see how TutorialCode.cpp is creating instances of these other things and calling their methods.
In visual studio, I went to the Debug tab, and clicked step into to try and determine what is going on, but as far as I can tell the code being stepped into is only related to launching the editor. I just tried setting a breakpoint at IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, GameName, “GameName” ); to see what gets called next and it gave me a symbol loading error. Anyway, I just need some help figuring out from where I can instantiating my GridDriver.cpp class and call its Drive() function that orchestrates the rest.
Thanks a bunch.