quit new to unreal I am trying to make my own building system for a farm game, so for the objects that the player places I am looking for them objects with a tag then saving the ID for that object and the transform so that when I load in to the game I can get the ID for what type of object and the transform for the objects location and rotation and can spawn what I need from there on load, but when I load a transform for a object it will load more than what is saved if there is one object in the scene the transform variable saves on transform but on load it will load more then one,
There are sections missing such that it’s difficult to follow the logic directly. Here are some thoughts to help debug.
Are you sure you’re not calling the loading section more than once? Just before you save, print the number of elements in the array being saved then print number of elements again just after the load. Make sure these match.
When you’re in a situation like this, sometimes the best thing to do is remove all code and get down to the basics steps which in your case is, adding an element to an array to be saved, save it then read it back and make sure it matches. That means getting rid of all the for loops and getallactors, etc. Simply add a fake transform to the array, save and read it back. If that doesn’t work then then entire system is broken (highly unlikely), if it does then you know you have something off with your implementation. From there you can start adding functionality back slowly to see where things go awry.