Getting confused trying to figure this out in editor and finding post that helps. Just confused…
I have started to try learning to use structs so I can store data like a characters stats, but I have come upon an issue where simple adding a new variable or removing one even if the variable has not been used yet in literally any node just breaks everything. All nodes become unusable, refreshing them fixes them but requires me to go in and redo the logic for every single node and so on… I can’t think of literally every variable I will ever need all at once. Only solutions seems to be really long save struct and close and then reopen methods that just don’t seem very practical…
Are there fixes, or are there alternatives?
I heard something about DataObjects, Components, and I have heard of using blueprint Objects . What I cannot figure out is if I should or should not use one or the other, what their limits are compared to each other, and if they will work for multiplayer?
Maybe even if I am on the right track? xD… Structs seemed good, but they don’t work properly… Could completely brick the project if I got too far. Anyone with any help or suggestions, I would really appreciate it.
there is a workaround that I’ve read before. involves saving and closing out the project in a very specific order. IIRC it was posted by one of the regular question answerers here. Maybe it was the author of the Jigsaw inventory. I think kaidoom is the name? You might search that.
But… depending on specifics, it may make sense to use something other than structs, or maybe use something else during the phase of production in which you are figuring things out as you go, and thus this problem with blueprint structs will be annoying.
I think something like player stats makes sense to hold in an object or a data object. Likely it is something that lives or is passed to the GameInstance for saving. Working with an object is going to feel very similar to working with a struct. I am not sure there is any downsides except that the blueprint struct has a nice display in the graph editor - not a big deal though.
Components is fine too but thats not exactly the purpose of a component. A component is best used if you want to share behavior/data among non-similar classes. An example case might be that you want for containers in the game to be able to have inventories as well as your characetr. In that case, making an inventory component may make sense.
I am not familiar with data objects and what the major difference between them and a regular uobject is. Maybe they crunch down smaller or something, or read faster? I dunno, but havne’t had any issue with uobjects, which I’ve used a lot.