Editor "Copy-Paste" Inspector of monobehaviours after play mode

Hi All,

I have extended the CopyPaste( http://forum.unity3d.com/threads/74190-Copy-Paste-Editor-Extension-(-Save-changes-made-during-runtime) ) script, this script takes all the monobehaviour script changes in a particualar scene (during the play mode) and when requested to paste it pastes the modification wen you are out of play mode.

Download the attached “CopyPaste.cs” to your “Assets/Editor/” folder and you can find the window in “Tools/Copy-paste” to use this tool.

Note :-
I have extended the “CopyPasteEditor.cs” of [Noman]
Also this ( http://angryant.com/general/tips-and-tricks/CopyInspector ) post from AngryAnt must be useful

718800–26067–$CopyPaste.cs (9 KB)
718800–26137–$UpdatePrefab.cs (5.31 KB)

nice

Does it work with dynamically loaded prefabs?

No it wont work.This works only for the gameobjects which are persistent in the scene

I have uploaded another editor script “UpdatePrefab.cs”.

Menu name - Tools->Update Or Create Prefab

We have an option named “Auto Search Prefab” in this tool, which tries to find the original prefab based on two categories.

  1. If your prefab instance is static it can easily identify
  2. if your prefab instance is dynamic then it expects the gameobject name to be [prefabName] + (Clone) to find the corresponding prefab.
    for eg : if your prefab name is “Camera.prefab” then the instantiated gameobject name must be “Camera(Clone)” (this is what unity does by default)
  3. If its not able to find the corresponding prefab then you must manually assign the prefab to get updated.

Creating a new prefab from a gameobject is also avialable