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-5
In 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
. 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.