Skip to content

Instantly share code, notes, and snippets.

@tm8r
Created October 20, 2016 11:04
Show Gist options
  • Select an option

  • Save tm8r/c2deea19745faa8b4424e12f4e966bc9 to your computer and use it in GitHub Desktop.

Select an option

Save tm8r/c2deea19745faa8b4424e12f4e966bc9 to your computer and use it in GitHub Desktop.

Revisions

  1. tm8r created this gist Oct 20, 2016.
    17 changes: 17 additions & 0 deletions SelectType.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    using UnityEngine;
    using UnityEditor;

    public class SelectType : MonoBehaviour
    {
    [MenuItem ("Tools/SelectType #t")]
    static void SelectViewerSetting ()
    {
    var target = FindObjectOfType<Light> ();
    if (target == null) {
    Debug.Log ("not found");
    return;
    }
    Selection.activeGameObject = target.gameObject;

    }
    }