public override void ExecuteAction() { #if UNITY_EDITOR Unsupported.CopyGameObjectsToPasteboard(); #endif Paste.SetBufferDistance(Selection.transforms); }
private void CopySelection(GameObject[] selection) { if (selection != null && selection.Length > 0) { Selection.objects = selection; Unsupported.CopyGameObjectsToPasteboard(); } }
public static void Paste(GameObject[] targets) { Validate(targets); var previousSelection = Selection.objects; Selection.objects = targets; Unsupported.CopyGameObjectsToPasteboard(); Selection.objects = previousSelection; }
public override void ExecuteAction() { var selection = Selection.transforms; if (selection != null) { Unsupported.CopyGameObjectsToPasteboard(); Paste.SetBufferDistance(Selection.transforms); foreach (var transform in selection) { var go = transform.gameObject; go.hideFlags = HideFlags.HideAndDontSave; go.SetActive(false); } Selection.activeGameObject = null; } }
// Copy protected override void CopyNodesToPasteboard() { // Do nothing if nothing is selected. if (selection.Count == 0) { return; } // Select the nodes in the scene hierarchy. Selection.objects = selection.Select(n => ((Node)n).runtimeInstance.gameObject).ToArray(); // Copy them to the pasteboard. Unsupported.CopyGameObjectsToPasteboard(); // Recover the selection. UpdateUnitySelection(); // Reset the pasting offset counter. _pasteOffset = 1; }
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; } }
public override void ExecuteAction() { Unsupported.CopyGameObjectsToPasteboard(); Paste.SetBufferDistance(Selection.transforms); }