Scene change animation broken in built game
achimmihca opened this issue · comments
Actual behaviour
No scene change animation is visible.
Expected behaviour
There should be a smooth transition from one scene to the next.
Steps to reproduce
The issue occurs only in the built game (of v0.8.2).
The issue does not occur in the Unity editor.
Details
Provide some additional information:
- UltraStar Play version: v0.8.2
- Operating System: Tested on Android and Windows
[ERR] Graphics.CopyTexture called with null destination texture
I will look into this.
The null texture was not the root of the issue.
In general, the shader transition does not work in the built game.
I tested this with a jpg image as transition texture with the same result. It only works in the Unity editor.
@jean-moreno , could you please have a look? Does the scene transition work for you in the built game?
You can fork the branch anst/fixes if you want.
It's not just the scene transition, the _UI_SHADOW
does also not work in the built game.
I think Unity uses a different (fallback) shader for some reason in the built game.
I think Unity uses a different (fallback) shader for some reason in the built game.
Yes! When setting "Player settings > shader settings > strict shader variant matching", then Unity does not use a fallback shader and instead shows a bunch of errors and a pink error shader.
Shader UltraStar Play/Background Shader, subshader 0, pass 0: variant _DITHERING _UI_SHADOW not found.
Will be fixed with 4aac5be
My workaround: use float variables in the shader instead of preprocessor defines. Works for me.
@jean-moreno feel free to find the actual root of the issue.
Sadly, the shader still does not seem to work on Android. But there is no error message or error shader when enabling "strict shader variant matching". What a nuisance.
I don't have enough time to test, but I think you can replace the shader_feature_fragment
with multi_compile_fragment
directives in the shader code.
The former will only include the variants that are used by materials at build time, whether the second will always compile all variants regardless of their usage, so that they can be loaded at runtime in the build.
multi_compile_fragment
This did the trick. Thanks!
But it's still not working on Android. I will not put more time into this, no idea what's wrong.
Nothing in the log at all, related to shaders, on Android?
That's weird 🤔
It now works on Android as well. No idea why 🤣