Deselect

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
 
Line 2: Line 2:
 
[[Category: ScriptableObject]]
 
[[Category: ScriptableObject]]
 
[[Category: C Sharp]]
 
[[Category: C Sharp]]
[[Category: Camera]]
 
 
[[Category: Selection]]
 
[[Category: Selection]]
 
Author: Jonathan Czeck (aarku)
 
Author: Jonathan Czeck (aarku)

Revision as of 03:19, 1 July 2006

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# - SelectMainCamera.cs

<csharp>using UnityEngine; using UnityEditor;

public class Deselect : ScriptableObject {

   [MenuItem ("Custom/Deselect _a")]
   static void DoDeselect()
   {
       Selection.objects = null;
   }

} </csharp>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox