I have code identical to what you see below. It appears Update does run at least Once, when I first click the scene object, and play with any scene stuff.. but it's definitely not every frame.. In addition neither FixedUpdate or OnGUI are having any effect. I have NOOOO idea what the problem is here, as from everything I read about this, says the code shown below is valid. Placing a () after ExecuteInEditMode changes nothing.
[ExecuteInEditMode]
public class MyCustomBehaviour : MonoBehaviour
{
public void Update()
{
Debug.Log(".");
// Will run in edit mode.
}
public void FixedUpdate()
{
Debug.Log("..");
}
public void OnGUI()
{
Debug.Log("...");
}
}
Fixed: For anyone having issues related to this problem, remember that it's not every frame that Update is called.. but only when it is needed to be called.. meaning the objects state much change in some way first.. so I went ahead and created a CustomEditor for my script, and applied EditorUtility.SetDirt(target); inside of OnInspectorGUI();, what that did was tell Unity the objects state has changed, and Unity automatically invokes the scripts Update method(function). Because, OnInspectorGUI is updated each XXX frames, it then updates the script each XXX frames. Sorry for mah retarded moment. Thanks!