public override ModularPlacableObject Duplicate()
        {
            ModularSetStoreData SetData = new ModularSetStoreData(this);
            ModularSet          NewSet  = Management.GameManager.I.Modular.ModularBuildingSystem.InitNewModularSet(this);

            NewSet.AsyncLoadModularSet(SetData, (object[] Data) => {
                ModularSet Set = (ModularSet)Data[0];                                                                                                 // get set data
                ModularPieceSaveData PieceData = (ModularPieceSaveData)Data[1];                                                                       // get piece data
                Set.AddModularPiece(Management.GameManager.I.Modular.ModularBuildingSystem.InitStoreItem(PieceData), (ModularPlacableData)PieceData); // add store item
            });
            NewSet.gameObject.layer = this.gameObject.layer;                                                                                          // set layer
            NewSet.RegisterUndoable();                                                                                                                // register as undoable
            return(NewSet);
        }
        private ModularSet InitModularSetCore(ModularSet NewSet, ModularSetData SetData, bool InitInEditMode = false)
        {
            if (InitInEditMode)
            {
                NewSet.InitializeEditable();
            }                                                                   // init in edit mode
            NewSet.AsyncLoadModularSet(SetData, (object[] Data) => {
                ModularSet Set = (ModularSet)Data[0];                           // get set data
                ModularPieceSaveData PieceData = (ModularPieceSaveData)Data[1]; // get piece data

                ModularPiece Piece = InitStoreItem(PieceData);                  // init store item to modular piece
                if (Piece != null)                                              // only add when piece is not null
                {
                    Set.AddModularPiece(Piece, (ModularPlacableData)PieceData); // add store item
                }
            });
            return(NewSet);
        }         // core function for init modular set