diff --git a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/UnityPickers/AssetPickerDrawer.cs b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/UnityPickers/AssetPickerDrawer.cs index 669dbfc3..adf72ef0 100644 --- a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/UnityPickers/AssetPickerDrawer.cs +++ b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/UnityPickers/AssetPickerDrawer.cs @@ -10,12 +10,23 @@ public class AssetPickerDrawer : PropertyDrawer { public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { + if (fieldInfo == null) + { + // If fieldInfo is null, draw the property field as is. + EditorGUI.PropertyField(position, property, label); + return; + } + var assetType = fieldInfo.FieldType; if (assetType.IsUnityCollection()) assetType = assetType.GetElementType(); if (assetType == null) + { + // If assetType is null, draw the property field as is. + EditorGUI.PropertyField(position, property, label); return; + } var a = fieldInfo.GetAttribute();