C++ alternative like level blueprints

Are there any alternatives like level blueprints in c++

Basically I don’t want it to interact with the world. I want a central class that can be accessed by other classes which can store some important variables and functions that can be accessed by every other class.(I don’t know if thats how level blueprints work though)

For this I generally create the class through the gamemode class and stick a pointer to the class through gamemode. To access that class, I first use the pointer to the game mode and then access that class. But I think there are better ways to do what I am looking for.

If you want your data to be persistent between any level, you want to use a “GameInstance” class which is like a singleton.

BTW. The use of singletons is discorauged in any software and you should be careful about what are you exposing to everyone in your system. It could become a mess quickly, hard to mantain and to debug.