版本:
L2D SDK版本:CubismSdkForUnity-4-r.2.unitypackage Unity: 2020.3.0f1
报错详情:
MissingReferenceException: The object of type ‘Mesh’ has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. UnityEngine.Mesh.get_bounds () (at <84b6e991fb0f4a03b988324d08637fc4>:0) Live2D.Cubism.Rendering.Masking.CubismMaskRenderer.get_MeshBounds () (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskRenderer.cs:56) Live2D.Cubism.Rendering.Masking.CubismMaskRendererExtensionMethods.GetBounds (Live2D.Cubism.Rendering.Masking.CubismMaskRenderer[] self) (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskRendererExtensionMethods.cs:26) Live2D.Cubism.Rendering.Masking.CubismMaskMaskedJunction.RecalculateMaskTransform () (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskMaskedJunction.cs:186) Live2D.Cubism.Rendering.Masking.CubismMaskMaskedJunction.AddToCommandBuffer (UnityEngine.Rendering.CommandBuffer buffer) (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskMaskedJunction.cs:131) Live2D.Cubism.Rendering.Masking.CubismMaskController.Live2D.Cubism.Rendering.Masking.ICubismMaskCommandSource.AddToCommandBuffer (UnityEngine.Rendering.CommandBuffer buffer) (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskController.cs:270) Live2D.Cubism.Rendering.Masking.CubismMaskTexture.Live2D.Cubism.Rendering.Masking.ICubismMaskCommandSource.AddToCommandBuffer (UnityEngine.Rendering.CommandBuffer buffer) (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskTexture.cs:331) Live2D.Cubism.Rendering.Masking.CubismMaskCommandBuffer.RefreshCommandBuffer () (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskCommandBuffer.cs:137) Live2D.Cubism.Rendering.Masking.CubismMaskCommandBuffer.LateUpdate () (at Assets/Live2D/Cubism/Rendering/Masking/CubismMaskCommandBuffer.cs:155)
解决方案:
Cubism给出的方案 https://docs.live2d.com/cubism-sdk-tutorials/issue-of-assetbundle/?locale=ja
方案1、2不可同时使用,根据项目状况自行选择。 我自己的情况是 方案1。
注意点:
①、Case1的第二步,注意网页中的继承里面,相对于4.2r的SDK,少一项ICubismUpdatable,不可以根据解决方案去掉,否则会出现遮挡不掉眼球等问题。 ②、“//当該部分。この行を削除する”这个注释,是解决问题的重点。意为这行注释、消除
更的情况,等日后有时间补充。
转载请注明,喵喵丸的Blog。
|