mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-18 12:20:06 +08:00
25 lines
809 B
C#
25 lines
809 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using modular_avatar_tests;
|
|||
|
using nadena.dev.modular_avatar.core.editor;
|
|||
|
using NUnit.Framework;
|
|||
|
using UnityEngine;
|
|||
|
using VRC.SDK3.Avatars.Components;
|
|||
|
|
|||
|
public class MergeArmatureTests : TestBase
|
|||
|
{
|
|||
|
[Test]
|
|||
|
public void DontStripObjectsWithComponents()
|
|||
|
{
|
|||
|
var root = CreatePrefab("ColliderMergeTest.prefab");
|
|||
|
|
|||
|
AvatarProcessor.ProcessAvatar(root);
|
|||
|
|
|||
|
// We expect two children: Mergable and Hips$[uuid] (retained due to the BoxCollider)
|
|||
|
var targetHips = root.transform.Find("TargetArmature/Hips");
|
|||
|
Assert.AreEqual(2, targetHips.childCount);
|
|||
|
Assert.AreEqual("Mergable", targetHips.GetChild(0).gameObject.name);
|
|||
|
|
|||
|
Assert.NotNull(targetHips.GetChild(1).GetComponent<BoxCollider>());
|
|||
|
}
|
|||
|
}
|