• Unity
  • Spine slot alpha not working with URP 2d

  • Düzenlendi
Related Discussions
...

Hello,

I have a simple waterdrop animation that, in Spine, fades out near the end of the animation by setting the slots' alpha values.

Material is set to URP - 2D - Spine - Skeleton Lit.

I have zero experience with materials / shaders, so have tried toggling 'straight alpha texture' on material, combined with toggling export settings 'premultiplied alpha' on/off. I have also tried setting skeleton.A = 0 with no luck.

I have attached pictures of my current settings. Instead of getting the desired result, the animation turns white.

Please help - what other options have I been overlooking?

I can see nothing obviously wrong with your setup. Unfortunately we cannot reproduce your problem, both setting skeletonAnimation.Skeleton.A = 0.5f and using a skeleton with transparent slot colors worked at our local test setup.

My guess is that perhaps your settings under Project Settings - Quality are not using the desired 2D Render Pipeline Asset. Please check the active Quality settings tab for the Rendering field, it should also have your 2D UniversalRenderPipelineAsset assigned.

Hello Harald,

Thank you so much for your input. I did some more testing and solved the problem. The problem causing the alpha errors seem to be the export / import update of the skeleton data asset reference in prefabs.

I am using a simple prefab consisting of only a skeleton animation + 'destroy this game object after animation end' script.

When exporting updated skeletondata from spine, the existing prefab reference to the new data does not seem to update properly somehow, resulting in the weird animation looks. Manually creating a new prefab with the new skeleton data results in correct animation, which has me confused.

Doesn't Importing updated skeleton data auto update references / animation alpha keys somehow anymore?

Thanks for the info. Which Unity version are you using? There are some known issues in earlier Unity 2020.1 versions that have been resolved in very recent Unity updates.

6 gün sonra

I'm using 2019.3.15f1, don't know if that's the issue

9 gün sonra

Thanks for the info, that should not be the problem then.

Could you perhaps send us a minimal Unity project that demonstrates the problem as a zip package, to contact@esotericsoftware.com. Then we can have a look at what's going wrong.

Note that the Assets,PackagesandProject Settings` directories are sufficient, no need to send any other directories or files.


The difference between your prefab and the non-prefab object are that one has Advanced - PMA Vertex Colors enabled while the other one has it disabled. When both share the same settings, they are displayed identically.