From ca90b6437828b56185c5c61965e096b7e02454f8 Mon Sep 17 00:00:00 2001 From: sinaioutlander <49360850+sinaioutlander@users.noreply.github.com> Date: Tue, 10 Nov 2020 20:30:22 +1100 Subject: [PATCH] Revert a temporary attempt at fixing a crash --- .../Reflection/CacheObject/CacheFactory.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Inspectors/Reflection/CacheObject/CacheFactory.cs b/src/Inspectors/Reflection/CacheObject/CacheFactory.cs index 93cdeca..ddcfd38 100644 --- a/src/Inspectors/Reflection/CacheObject/CacheFactory.cs +++ b/src/Inspectors/Reflection/CacheObject/CacheFactory.cs @@ -54,19 +54,9 @@ namespace UnityExplorer.Inspectors.Reflection { var pType = param.ParameterType; - if (pType.IsByRef && !pType.IsPrimitive && pType != typeof(string)) + if (pType.IsByRef && pType.HasElementType) { - if (pType.IsArray || pType.Name.Contains("Array")) - return false; - - try - { - pType = pType.GetElementType(); - } - catch - { - return false; - } + pType = pType.GetElementType(); } if (pType != null && (pType.IsPrimitive || pType == typeof(string)))