Fix #694 Turkish "i" problem.

This commit is contained in:
Masataka SUMI
2021-01-27 15:12:46 +09:00
parent 4e4cc1150c
commit 1cf9cba349
2 changed files with 11 additions and 1 deletions

View File

@@ -117,7 +117,7 @@ namespace VRM
var group = new glTF_VRM_BlendShapeGroup
{
name = clip.BlendShapeName,
presetName = clip.Preset.ToString().ToLower(),
presetName = clip.Preset.ToString().ToLowerInvariant(),
isBinary = clip.IsBinary,
binds = list,
materialValues = materialList,

View File

@@ -190,6 +190,16 @@ namespace VRM
var json = model.ToJson();
Assert.AreEqual(@"{""presetName"":""neutral"",""binds"":[],""materialValues"":[],""isBinary"":false}", json);
Debug.Log(json);
// https://github.com/vrm-c/UniVRM/issues/694
// Must pass even if this computer's locale was tr-TR.
var model2 = new glTF_VRM_BlendShapeGroup()
{
presetName = "I",
};
var json2 = model2.ToJson();
Assert.AreEqual(@"{""presetName"":""i"",""binds"":[],""materialValues"":[],""isBinary"":false}", json2);
Debug.Log(json);
}
[Test]