概要
using System.Linq; using UnityEngine; public class Example : MonoBehaviour { private void Awake() { var list1 = new[] { 1, 2, 3 }; var list2 = new[] { 1, 1, 1 }; Debug.Log( list1.Distinct().Count() == 1 ); // False Debug.Log( list2.Distinct().Count() == 1 ); // True } }