mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-23 02:55:07 -05:00
Merge pull request #1494 from ousttrue/fix10/fix_dupl_firstperson
[1.0][FirstPerson]同じ対象に対する設定が複数ある場合に、先頭のものを採用する
This commit is contained in:
@@ -155,8 +155,17 @@ namespace UniVRM10
|
||||
|
||||
var runtime = go.GetComponent<UniGLTF.RuntimeGltfInstance>();
|
||||
var firstPersonBone = go.GetComponent<Animator>().GetBoneTransform(HumanBodyBones.Head);
|
||||
|
||||
var used = new HashSet<string>();
|
||||
foreach (var x in Renderers)
|
||||
{
|
||||
if (!used.Add(x.Renderer))
|
||||
{
|
||||
// 同じ対象が複数回現れた
|
||||
Debug.LogWarning($"VRM10ObjectFirstPerson.SetupAsync: duplicated {x.Renderer}");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isSelf)
|
||||
{
|
||||
await SetupSelfRendererAsync(go, runtime, firstPersonBone, x, layer, awaitCaller);
|
||||
|
||||
Reference in New Issue
Block a user