Is it possible undo after building player?

I’m new to unity,so if here has any problem please forgive me。

I’m working a plugin about auto building player for different channel,so that i need to change game object in scene to fitting different platform。But the question here is i change or maybe delete game object before building,and when it finish,the game object should revert to original state。I try Undo.RegisterCompleteObjectUndo()and Undo.PerformUndo(),but it dosen’t work。I guess maybe the undo stack was flush after building player。Is it possible to make it scene? or how can i did it in other way?thanks。

I know English isn’t your first language, but can you write your question in very clear, short, sentences? I can’t follow the crux of your question! You could write a sentence in your native language (Chinese?) on Google Translate and translate it back to English. Try not to use technical words, because they do not translate very well.

Why do you need to change your gameObject in scene for different platforms? A game will only run on one platform at a time…

I also do not know what an “undo stack flush” is! Sorry.