Download

Sub-Instance like blueprint?

Hi out there :slight_smile:

I am puzzled on how to store some generic variables in the best way possible.
I am creating some game assets that i would like to be able to migrate to other projects, without these assets having to many dependencies that is not relevant for the specific project.

Lets say i have an enemy parent class, and in that class i have an integer array that specifies which loot might fall off.

Lets now say that i want to create a list that actually contains all the needed information about all loot items.
I want this list to be generic, such that i can add or remove information whenever i want inside the editor (the information is not meant to be edited in game).
The reson for this is that i now have something the enemyBP can refer to and i can continue to code generically.
The best way i can think of at the moment, is to create a Struct which contains the information i need, and create this struct in a GameInstance.

But if i want to take all my enemies and use in another project, i will need to use this GameInstance in the new project, as my enemyBP now refers to this. If i have another GameInstance in this project already, i have a problem.

Instead I could just create a generic blueprint, and store the values in there. However i will need to spawn a new blueprint in each level, or everytime i need to use it or something like that, which also has it obvious disadvantages.

Is it possible to refer to the class only, and thereby get the info from an uncreated object?
Is there something that mimics the effects og the GameInstance that i can have 100 of if i want to?
Or is there an even smarter solution to this?

Hope there are someone out there who can help.

Thanks in advance :slight_smile: