First of all you don’t need / shouldn’t use all the group stuff as this is only relevant for seperate changes that are not applied at the same time. A single undo operation can contain as many changes you can imagine. An registrated undo is flushed / finalized when the control is back to the Unity editor. As long as you are inside your own method any changes on recorded objects will be recorded to the same undo operation.
The next issue is RecordObject(s) will only record the provided object(s). However this does not include any components or child objects. If you want to do several changes to several different components and objects you may want to use Undo.RegisterFullObjectHierarchyUndo on every object you’re going to change.
ps: “Multiple Snaps” seems to be a strange name for an undo operation. In general it’s usually better for any editor tool to work with the Selection class unless you need this specifically only for a certain purpose.
I’ve never had to do this, but i read a bit on it. The usual way is to create commands. One with Execute and Undo methods. Each time one command is called with Execute, you add it to a list. Then when ctrl-z is pressed, take the last command from the list, and call Undo.
Obviously, you need to make it so whatever Execute does is cancelable by Undo for the same command.