I made a blueprint class to store some data in it, nested directly from UObject (or, as it is displayed in the blueprint creation UI, just Object). I also made it implement some blueprint interfaces and added some variables to maintain internal state.
Now, how would I use it? By using, I mean how do I instantiate it and pass it to somewhere? Like in a LevelBluprint, in construct script or in OnBeginPlay event, I want to create some instances of my class (lets say class name is MyItem) and add them to an array, which is stored in a level blueprint.
Also, I don't quite understand what would the scope of such object be. Will it exist during the level lifetime, or will be refcounted, or will it just leak? Or there is just no way to instantiate any non-spawnable classes from blueprints?
Also, how does the ownership works with UObjects and AActors? Who owns an instance of AActor subclass when it gets spawned? And how are they passed around - via references?
And, maybe not relevant to here and more like legit C++ question: are blueprints thread-safe? How to maintain thread-safety in the engine? It is multithreaded, right?
Now, how would I use it? By using, I mean how do I instantiate it and pass it to somewhere? Like in a LevelBluprint, in construct script or in OnBeginPlay event, I want to create some instances of my class (lets say class name is MyItem) and add them to an array, which is stored in a level blueprint.
Also, I don't quite understand what would the scope of such object be. Will it exist during the level lifetime, or will be refcounted, or will it just leak? Or there is just no way to instantiate any non-spawnable classes from blueprints?
Also, how does the ownership works with UObjects and AActors? Who owns an instance of AActor subclass when it gets spawned? And how are they passed around - via references?
And, maybe not relevant to here and more like legit C++ question: are blueprints thread-safe? How to maintain thread-safety in the engine? It is multithreaded, right?
Comment