I am experiencing a strange issue on some of my models where the a body part that is masked will not show up at runtime. In particular, the pupils for a character, which are masked by the white parts of the eye, will not show up at runtime. See the image below:
However, the pupils will show up in the editor when the game is not running:
As you can see, the right pupil (named ArtMesh2) is using the UnlitMasked material:
The left pupil (named ArtMesh7) is also experiencing the same issue.
I believe this may be an issue relating to the fact that the pupils are separate ArtMesh objects that are actually copies of one another (I just duplicated one pupil to create the second one.) My reason for thinking this may be the case is an old bug that was reported here:
https://community.live2d.com/discussion/450/some-body-parts-missing-in-unity-5-5In that link, the original poster stated that they experienced the issue because they were using duplicate ArtMesh objects, and were able to resolve their issue by editing Live2D.shader and replace
Cull [_cull] with
Cull Off
This issue was resolved several years ago, and now there is no such Live2D.shader. Instead, I found Project/Assets/Live2D/Cubism/Rendering/Resources/Live2D/Cubism/Shaders, which contains
Mask.shader and
Unlit.shader. However, both of those shader files already have the code
Cull Off.
I should also mention that I have experienced this problem with a few of my models, but I am only able to consistently reproduce the issue with the model I have shown in the screenshot--the pupils on that model always fail to display.
The SDK version I am using is CubismSdkForUnity-4-beta.2
I am using Unity 2019.2.17f1 on macOS Mojave.
All of my models were created in Live2D Cubism Editor 4.0.
Comments
Thank you for your contact.
This is Live2D Support.
We apologize for any inconvenience this may cause.
What is the Projection setting for the Camera placed in the Scene?
If the Projection is set to Perspective, change the Projection to Orthographic or change the Mode in the Sorting of CubismRednerController to Back To Front Order.
If the above doesn't solve the problem, could you please send me a DM with the smallest project where the problem occurs so that I can investigate?
https://community.live2d.com/discussion/1345/reset-the-mask/p1?new=1