Search Unity

EditorWindow scripting

Discussion in 'Scripting' started by ricardo.mello, Sep 2, 2009.

  1. ricardo.mello

    ricardo.mello

    Joined:
    Sep 2, 2009
    Posts:
    14
    Hi,

    I have two questions:

    1. I´m doing some Editor utility windows, and I´d like to use some shortcuts for specific commands, but I couldnt grab the key pressed.
    See, I dont want a menuitem shortcut, all I want is something like "input.getkeydown" working for an editorwindow. Any ideas?

    2. I managed to make a "select next" and "select previous" button for gameobjects, and the selection works fine. The only problem is that I have a custom Inspector Window that is not automatically activated. If I select the gameobject directly using the mouse, the inspector works fine. Any ideas to trigger the inspector update after doing a scripted selection?

    Thanks for the help,

    []s, gandhi
     
  2. ricardo.mello

    ricardo.mello

    Joined:
    Sep 2, 2009
    Posts:
    14
    I managed to make it work. :)

    1. used Event.current inside OnGui
    2. selected activegameobject instead of activetransform

    thanks anyway. ;)

    []s, gandhi