cancel
Showing results for 
Search instead for 
Did you mean: 

Constant [ExecuteInEditMode] updates in Oculus Utilities 1.15+

zachkinstner
Honored Guest
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.

1 REPLY 1

kersk
Meta Employee
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!