I have a C++ class of type UObject and I want to know what I need to do so that it is persistent throughout the game. I want to be able to create the object in the blueprints and then call functions on it when needed. I can’t figure out how to do that in the blueprints.
I think all UObjects are persistent, you spawn therem with this node:
Theres also class dedicated for persistent game data, so maybe extend from that or spawn from that:
Thank you for your answer. Is there anyway I can call functions on that object (construct object from class) through blueprints?
Yes, just cast return value to your class and from it you can call it’s function nodes same as you do with actors. I assume you know how to bind functions so they can be used in blueprint.
Got it to work. I had to construct the object from class, set it to a variable (to be reused later), and made the function blue-printable in the header also. Thanks.