Skip to main content
New Participant
September 20, 2017

Constant [ExecuteInEditMode] updates in Oculus Utilities 1.15+

In Oculus Utilities 1.15+ (and possibly earlier), the Oculus code causes the Unity editor to constantly call Update() on components with the [ExecuteInEditMode] attribute. This is not the standard Unity behavior, and for complex scenes, the constant updates can make the editor run very slowly.

I tracked down the issue to a line in OVRMoonlightLoader. Commenting out this line avoids the constant updates:
EditorApplication.update += EnforceInstallLocation;
In Oculus Utilties 1.18.1, you can also avoid the issue by unchecking this checkbox: Tools > Oculus > Use Required Project Settings.

Ideally, the Oculus Utilities can avoid causing this issue in future versions. For now, however, maybe this workaround might be helpful for someone.

This topic has been closed for replies.

1 reply

Meta Employee
September 24, 2017
Thanks for the head's up! Using editor update callbacks and [ExecuteInEditMode] are generally kosher when used appropriately, but, as you discovered, modifying the android install location was surprisingly causing a full scene update and a few other operations happening in there were adding up as well. We've resolved the editor performance issues for the next release. Thanks again for bringing it to our attention!