Deselect

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Removing all content from page)
m (Reverted edits by Joseph05408 (Talk); changed back to last version by Andrewp)
Line 1: Line 1:
 +
[[Category: Wizard]]
 +
[[Category: ScriptableObject]]
 +
[[Category: C Sharp]]
 +
[[Category: Selection]]
 +
Author: Jonathan Czeck (aarku)
 +
==Description==
 +
This editor script sets the current selection to nothing.  It deselects.
  
 +
==Usage==
 +
Place this script in ''YourProject/Assets/Editor'' and a menu item will automatically appear in the Custom menu after it is compiled.
 +
 +
==C# - DeselectAll.cs==
 +
<csharp>using UnityEngine;
 +
using UnityEditor;
 +
 +
public class DeselectAll : ScriptableObject
 +
{
 +
    [MenuItem ("Custom/Deselect All _a")]
 +
    static void DoDeselect()
 +
    {
 +
        Selection.objects = new UnityEngine.Object[0];
 +
    }
 +
}
 +
</csharp>

Revision as of 19:16, 19 October 2009

Author: Jonathan Czeck (aarku)

Description

This editor script sets the current selection to nothing. It deselects.

Usage

Place this script in YourProject/Assets/Editor and a menu item will automatically appear in the Custom menu after it is compiled.

C# - DeselectAll.cs

<csharp>using UnityEngine; using UnityEditor;

public class DeselectAll : ScriptableObject {

   [MenuItem ("Custom/Deselect All _a")]
   static void DoDeselect()
   {
       Selection.objects = new UnityEngine.Object[0];
   }

} </csharp>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox