Search Unity

Update editor after script flags checks in the inspector.

Discussion in 'Scripting' started by Bluestrike, Sep 5, 2011.

  1. Bluestrike

    Bluestrike

    Joined:
    Sep 26, 2009
    Posts:
    256
    I have a script that controls a light to be on or off.
    The script also has a boolean to make the light start on or off when the level loads.

    Now I want the targeted light to turn on/off inside the editor as well if a player manipulates the setting.

    So if there some function that controls the editor like Reset()
    that executes every time a change is made to the settings in the inspector?
     
  2. Bluestrike

    Bluestrike

    Joined:
    Sep 26, 2009
    Posts:
    256
    @script ExecuteInEditMode()