谢谢(你的)信息。虽然 3.8 版本比我想的错误修正要旧一点,但 SkeletonGraphic
应该已经在您的 3.8 版本的 spin-unity 运行时中进行了所有空检查。
您是否使用任何延迟加载机制,例如资产包、资源、可寻址等?
问题可能只发生在预制件上,还是也发生在普通游戏对象上?有问题的骨架游戏对象是场景的一部分,还是在运行时以不同方式添加(作为预制件、通过代码等)?
你提到它有时也会发生在构建的 .apk 包中:在构建一个包之后,每次运行相同的构建包时,它是否会失败,并且每次运行相同的构建包时都会失败,并且在每 N 个构建之后(因此设置失败)在建造期间)?或者有时单个构建会失败(因此失败在运行时是随机的)?
您是否有任何活动脚本可以修改“SkeletonGraphic”作为预构建步骤,或者在运行时启动时修改它?
您能否向我们发送一个仍然演示此问题的最小 Unity 项目?您可以将其作为 zip 包发送至 contact@esotericsoftware.com,并简要提及此论坛主题 URL,以便我们了解上下文。然后我们可以看看它。
Thanks for the info. While version 3.8 is a bit older than the bugfix I was thinking of, SkeletonGraphic
should already have all null-checks in place in your 3.8 version of the spine-unity runtime.
Are you using any delayed-loading mechanisms such as asset bundles, resources, addressabled or the like?
Is the problem perhaps only occurring at prefabs, or on normal GameObjects as well? Is the problematic skeleton GameObject part of a scene, or is it added differently at runtime (as a prefab, via code, etc.)?
You mentioned that it sometimes happens with the built .apk package as well: after one package is built, is it then failing with skeletonDataAsset
being null every time you run the same build package, and after every N builds (so failure is set during built-time)? Or does a single build fail sometimes (so failure is random at runtime)?
Do you perhaps have any scripts active that modify the SkeletonGraphic
either as a pre-build step, or modify it at startup during runtime?
Could you perhaps send us a minimal Unity project that still demonstrates this problem? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at it.