From fa000c5ff90ab5926e2f3fb27d5c952e9b79a00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20-=20Marcel=20B=C3=B6ddecker?= Date: Thu, 24 Oct 2019 16:58:39 +0100 Subject: [PATCH] fix(Tracking): update exception message in ObscuranceQuery The ObscuranceQuery logic was changed so the Target requires either a Collider or if it has a Rigidbody then there must be at least 1 child Collider. The Exception messages we never updated so it provided inaccurate information if the usage criteria was incorrect. --- Runtime/Tracking/Query/ObscuranceQuery.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Runtime/Tracking/Query/ObscuranceQuery.cs b/Runtime/Tracking/Query/ObscuranceQuery.cs index d14509a6..ed70ede5 100644 --- a/Runtime/Tracking/Query/ObscuranceQuery.cs +++ b/Runtime/Tracking/Query/ObscuranceQuery.cs @@ -8,9 +8,9 @@ using Malimbe.XmlDocumentationAttribute; using Malimbe.PropertySerializationAttribute; using Zinnia.Cast; - using Zinnia.Data.Type; - using Zinnia.Extension; using Zinnia.Process; + using Zinnia.Extension; + using Zinnia.Data.Type; /// /// Determines whether any obscures a line between two s. @@ -30,7 +30,7 @@ public class HitEvent : UnityEvent> public class MissingColliderException : Exception { - public MissingColliderException(UnityEngine.Object owner, GameObject missingColliderGameObject) : base($"The configured {nameof(Target)} '{missingColliderGameObject}' on '{owner}' needs a {nameof(Rigidbody)} or {nameof(Collider)} on it.") { } + public MissingColliderException(UnityEngine.Object owner, GameObject missingColliderGameObject) : base($"The configured {nameof(Target)} '{missingColliderGameObject}' on '{owner}' needs a {nameof(Collider)} on it or if it has a {nameof(Rigidbody)} on it then a child {nameof(Collider)} is required.") { } } /// @@ -121,7 +121,7 @@ protected virtual void OnDisable() } /// - /// Throws a if has neither a nor a on it. + /// Throws a if is missing a or if the has a and is missing a child . /// protected virtual void CheckTarget() {