-
assigned issue to
Project Validator not running in Unity Cloud Build
I have the following automated validation setup:
I tested this setup by deleting the script for one of my components. Sure enough, when I tried to build locally, it failed with a “Broken component” message. However, in Unity Cloud Build, the build still succeeded, and I didn’t see the broken component message anywhere in the Full Logs. Is there perhaps some code in the validation system that only allows it to run within the Unity Editor, and not in batch mode?
I am using Odin 3.0.2.0 in Editor Only mode on Unity 2020.1.8f1.
Comments (5)
-
-
reporter @Tor Esa Vestergaard This issue is still occurring with Odin 3.0.5 on Unity 2021.1.5f1 on Windows 10 (in Editor Only mode). From debugging, it looks like you register the various hook actions in the static
OdinValidationConfig.InitHooks
method. Unfortunately, those hooks are registered inside a callback passed to yourUnityEditorEventUtility.DelayAction
method, which relies on an Editor update to call that callback, and update methods are not called in Cloud Build. I was able to get the hooks running in Cloud Build when I tweaked the code to register them synchronously. So, might I suggest doing a check insideInitHooks
to see if the Editor is currently running in headless/batch mode, and if so, register the hooks synchronously, rather than in a callback? -
That’s good information, and a good suggestion. I can certainly make that change - would you be amenable to contacting me on Discord to try out a build with that change incorporated and verify that it works out-of-the-box?
-
reporter Sure! I’ll contact you there.
-
- changed status to resolved
Confirmed resolved, fix will be in Odin 3.0.6
- Log in to comment