Make object to change state in Editor

I have objects in scene that can take different states and are switching their appearance depending on its current state (for example, show or hide a flag).

State can be changed manually in editor as well as at runtime. When state changed at runtime, then actions are taking place to change appearance .

In Editor, of course, scripts are not running.

Is it possible to script an object such way that it will execute some actions at ‘editor time’ to change appearance depending on manually selected state?

You can do what you want with ExecuteInEditMode.

http://docs.unity3d.com/Documentation/ScriptReference/ExecuteInEditMode.html