Beispiel #1
0
        internal static bool CanPasteAsChild()
        {
            bool canPaste = (Unsupported.CanPasteGameObjectsFromPasteboard() || CutBoard.hasCutboardData) &&
                            ((SceneHierarchyWindow.lastInteractedHierarchyWindow != null && SceneHierarchyWindow.lastInteractedHierarchyWindow.sceneHierarchy != null) ||
                             SceneView.lastActiveSceneView != null) &&
                            Selection.transforms.Length == 1;

            var activeGO = Selection.activeGameObject;

            if (activeGO != null && SubSceneGUI.IsSubSceneHeader(activeGO))
            {
                return(canPaste && SubSceneGUI.GetSubScene(activeGO).IsValid());
            }

            return(canPaste);
        }