Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling Reflection Baking does not stop UWP warnings #208

Open
NoTuxNoBux opened this issue Jan 18, 2021 · 3 comments
Open

Disabling Reflection Baking does not stop UWP warnings #208

NoTuxNoBux opened this issue Jan 18, 2021 · 3 comments

Comments

@NoTuxNoBux
Copy link

NoTuxNoBux commented Jan 18, 2021

Describe the bug
Reflection baking shows warnings about it not being supported are displayed on UWP, even when it is disabled entirely.

To Reproduce

  1. Switch the build settings to target UWP.
  2. Ensure reflection baking is disabled in the settings, through Assets -> Create -> Zenject -> Reflection Baking Settings and uncheck "Is Enabled In Builds" and "Is Enabled In Editor".
  3. Observe warnings on every script recompilation, despite is being disabled:
Zenject reflection baking skipped because it is not currently supported on WSA platform!
UnityEngine.Debug:LogWarning(Object)
ModestTree.Log:Warn(String, Object[]) (at Library/PackageCache/com.svermeulen.extenject@c2e33500a8/Source/Internal/Log.cs:38)
Zenject.ReflectionBaking.ReflectionBakingBuildObserver:OnAssemblyCompiled(String, CompilerMessage[]) (at Library/PackageCache/com.svermeulen.extenject@c2e33500a8/OptionalExtras/ReflectionBaking/Unity/ReflectionBakingBuildObserver.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget)

Expected behavior
No warnings are shown, as reflection baking is disabled.

They should only be displayed if it is enabled and baking cannot be performed because the target platform does not support it.

Extenject and Unity info (please complete the following information):

  • Zenject version: 9.2.0.
  • Unity version: 2019.4.18f1
  • Project's scripting backend [e.g. Mono/IL2CPP]: IL2CPP

Additional context
ReflectionBakingBuildObserver seems to read ZenjectReflectionBakingSettings but does not read IsEnabledInEditor or IsEnabledInBuilds. Instead, it just always displays a warning on UWP, no matter whether it's enabled or not.

Alternatively, being able to uninstall the optional reflection baking extension would also solve this, but this requires #24 and an optional package per optional extra.

@FreakTheMighty
Copy link

I realize this is off topic, but I can’t find any explanation for why baking isn’t supported on WSA. Is there any record of why this can’t be done or what work would need to be done to add baking?

@Holo-Krzysztof
Copy link

I'd also like to know why this isn't supported. Is it any different than other IL2CPP-only build targets? Is it due to winmd support being special or something else entirely?

@FreakTheMighty
Copy link

@Holo-Krzysztof I recently just commented out the warning/exit from the baking function and managed to build and run with baking on. I haven't done much more investigation, but it wasn't obviously broken. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants