Alright I think I understand, Thanks for replying and assisting me with this, its greatly appreciated. I’m going to try what you suggested above and see how it goes.
Edit:
Upon thinking about it a bit more, how would, from another class, assign a pointer to my existing GridManager. I don’t want to create a new GridManager with no TileMap I want to find syntax to reference my existing GridManager with an already created TileMap. I’m not sure how to do this and while doing this in GameMode would be good practice, I think its the same problem I’m faced with now… How do I do this?
// GridManager.h
AGridManager* GetGridManager();
// GridManager.cpp
AGridManager::GetGridManager()
{
return this;
}
// UnitManager.cpp
AGridManager* GridManager; //<-- Does this need to be in the header or could it be within the function?
GridManager->GetGridManager();
/// OR does there exist another way of doing this, how would I assign the pointer with & from another class
Apologies, I’m in this weird place where I understand the problem and how to solve it but I’m not familiar enough or haven’t had enough c++ experience to find the correct syntax to solve this