it seems that ExecuteInEditMode doesnt work in unity3, cuz I always used this tag in 2.6, everything worked fine. And now Update in script with ExecuteInEditMode is called only in some cases like when you click hierarchy screen, or reimport script and so on… and this is bad (((
here’s lil snipet I use for testing.
[ExecuteInEditMode]
public class Test : MonoBehaviour
{
public void Update()
{
print(Event.current);
if (Input.GetMouseButton(0))
print("Hello");
}
}
As I have said in some cases it prints “null” as current event, but prints it portionally, by 1-3 lines. And only when I make some actions in editor.
it works fine for me, it won’t update continously though.
what I’m not sure if it does anything in this context is event checking cause the events actually should be processed and like also eaten by the editor as you are effectively in the editor not in play mode so editor has always priority
ExecuteInEditMode is a bit limited because there isn’t a regular frame update in the editor like there is during gameplay. If you want to execute code at regular intervals in the editor, you can use the EditorApplication.Update delegate. To use it, just declare a function with no parameters and assign its name to the property:-