Quick Question. How do I keep a Blueprint alive throughout the game life cycle.
Basically my blueprint calls some functions of a cpp class which takes care of networking (TCP/IP) and I can’t create sockets again and again for every map. So I want to keep blueprint alive throughout the game and use its functions whenever required.
I am a newbie in Unreal4. In Unity I used to do Don’tDestroyOnLoad for Gameobjects for this type of purpose.
Please help me out on this.
Guies if you check this question and you don’t know the answer please upvote it, increasing chances of getting an answer.
if you write the functions you need access to throughout the entire game in a GameInstance class, then in your project settings, in maps & modes, set your GameInstance class to the custom one you created, you’ll be able to do what you are asking about.
Thanks man thats what I was looking for. I am moving my blueprint content which I want to keep in GameInstance Class.
So I did what you suggested. Its working in a way but my blueprint wants a reference to an item in scene and I want to keep that item in all levels without losing its references, values. How can I do it?