Пример #1
0
        public override void ExecuteAction()
        {
#if UNITY_EDITOR
            Unsupported.CopyGameObjectsToPasteboard();
#endif
            Paste.SetBufferDistance(Selection.transforms);
        }
Пример #2
0
        public override void ExecuteAction()
        {
            var selection = Selection.transforms;

            if (selection != null)
            {
#if UNITY_EDITOR
                Unsupported.CopyGameObjectsToPasteboard();
#endif
                Paste.SetBufferDistance(Selection.transforms);

                foreach (var transform in selection)
                {
                    var go = transform.gameObject;
                    go.hideFlags = HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor;
                    go.SetActive(false);
                }

                Selection.activeGameObject = null;
            }
        }