using System; using UnityEngine; using VRM; public static class VRMMonoBehaviourComparator { public static bool AssertAreEquals(GameObject l, GameObject r) { return AssertAreEquals(l, r, (x, y) => x[0].Meta.Equals(y[0].Meta)) ; } public static bool AssertAreEquals(GameObject l, GameObject r, Func pred) where T : Component { var ll = l.GetComponents(); var rr = r.GetComponents(); if (ll.Length != rr.Length) { return false; } if (ll.Length == 0) { return true; } return pred(ll, rr); } }