// ----------------------------------------------------------------------
        public static void PasteIntoGraph(iCS_MonoBehaviourImp sourceMonoBehaviour, iCS_EngineObject sourceRoot,
                                          iCS_IStorage iStorage, iCS_EditorObject parent, Vector2 globalPos)
        {
            if (!IsCreationAllowed())
            {
                return;
            }
            OpenTransaction(iStorage);
            iCS_EditorObject pasted = null;

            try {
                iStorage.AnimateGraph(null,
                                      _ => {
                    if (parent.IsFoldedInLayout || parent.IsIconizedInLayout)
                    {
                        parent.Unfold();
                    }
                    iCS_IStorage srcIStorage = new iCS_IStorage(sourceMonoBehaviour);
                    iCS_EditorObject srcRoot = srcIStorage.EditorObjects[sourceRoot.InstanceId];
                    pasted = iStorage.Copy(srcRoot, srcIStorage, parent, globalPos, iStorage);
                    if (pasted != null)
                    {
                        if (pasted.IsUnfoldedInLayout)
                        {
                            pasted.Fold();
                        }
                        iStorage.SelectedObject = pasted;
                        iStorage.ForcedRelayoutOfTree();
                    }
                }
                                      );
            }
            catch (System.Exception) {
                CancelTransaction(iStorage);
                return;
            }
            if (pasted != null)
            {
                SystemEvents.AnnounceVisualScriptElementAdded(pasted);
            }
            CloseTransaction(iStorage, "Add Prefab " + sourceRoot.RawName);
        }