From 13a9bb00889a765d58694d6842e4d1d0488ba145 Mon Sep 17 00:00:00 2001 From: Dylan Smit <41569500+smitdylan2001@users.noreply.github.com> Date: Sat, 20 Jul 2024 18:05:25 +0200 Subject: [PATCH] Performance improvement Changed Count() to Any() Minor performance improvement from LINQ --- Runtime/MixedReality/VarjoMixedReality.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/MixedReality/VarjoMixedReality.cs b/Runtime/MixedReality/VarjoMixedReality.cs index b3d1779..6432534 100644 --- a/Runtime/MixedReality/VarjoMixedReality.cs +++ b/Runtime/MixedReality/VarjoMixedReality.cs @@ -429,7 +429,7 @@ internal static bool StartDataStream(VarjoStreamType type, VarjoStreamCallback c { if (!IsMRReady()) return false; var customAttribs = callback.Method.CustomAttributes.Where(a => a.AttributeType.FullName.Equals("AOT.MonoPInvokeCallbackAttribute")); - if (customAttribs.Count() == 0) + if (customAttribs.Any()) { Debug.LogError($"{callback.Method} is missing the [AOT.MonoPInvokeCallback] attribute"); return false;