Having trouble giving my actors a GUID

Hey, i’m working on save system for my game and currently working on saving the rotation and some other variables of my doors in the game. How i’m thinking of doing it is having a struct that i save, and this struct contains the needed variables and the unique ID of the door that the variables was gathered from. Since i’m saving the doors unique ID the system should be able to find which door matches the ID and set the variables when loading the save file.

But i have currently gotten stuck with giving the doors their own ID. I have tested the Guid system a bit and it seems like this would work well with what i’m trying to do. I give the doors their own guid in the constructor in C++ which works just fine. But the issue i’m having is when i copy and paste a door that already has been placed in the world, i’m not sure how i should go about having the guid reset to a new value automatically, as when i duplicate a door there will be a duplicate guid value on the two doors.

I was testing comparing all the doors to see if their guid is the same and then changing one of the doors guid but i don’t know i would find out which door is the result of the duplication. I really don’t want the doors that already have their own guid get theirs changed as it might cause some issues with the wrong door getting the loaded variables.

Does anyone have any idea how i can solve this? Any help would be appreciated.

Hello, did you find a solution?