Structs Extremely Unstable - Alternative To Structs?
When I am using a struct to store information such as having a Struct for a Character (storing their name, class, equipped gear, etc.), it has become quite tiresome to get random crashes when some values are added/changed.
The random crashes seem to be trying to reference values that no longer exist, or values that have changed, or default values. Whenever I edit a struct that is being referenced elsewhere, it has something like a 15% chance that struct will become corrupt and crash the project when it is referenced in-game. And I have no way of finding out why, where, or how it became so.
Everything else so far has worked pretty well in UE4, but having to make a new struct and go through blueprints one at a time and re-hook up the new reference is becoming REALLY tiresome.
Does anyone have a suggestion for an alternative to Structs, or a fix for this?
Not sure i really understand what u are doing with the structs and savegames, but it sounds very complicated. I bet u are doing something that is not intended by the engine.
When u just want to temporarily save data of characters or actors and u have instances of these in game, just keep the changes in the character/ actor and save it when leaving the game or on level change. In the marketplace there is the Rama Save System i would use for saving actor/character related stuff for such things. It will save u so much time, believe me. Instead of fighting with the save game slots u just add a component to the actors u wanna save and the system saves all info u want whenever u want.
answered Jun 24 '17 at 08:59 AM
I would guess that the crashes arent caused by the actual structs but that your are trying to access a struct array with an index greater than length (for the crashes). Check maybe that the array ID values are never greater than the length with a simple branch and breakpoint when playing.
answered Jun 24 '17 at 09:25 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here