Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
uurha committed Apr 8, 2023
1 parent dc2bd4f commit 6b2d620
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
3 changes: 2 additions & 1 deletion Editor/BetterEditorTools.Editor.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "BetterEditorTools.Editor",
"rootNamespace": "Better.EditorTools",
"references": [
"GUID:443314a5a4e67c14a88ae223776b6554"
"GUID:443314a5a4e67c14a88ae223776b6554",
"GUID:28da8d3b12e3efa47928e0c9070f853d"
],
"includePlatforms": [
"Editor"
Expand Down
15 changes: 2 additions & 13 deletions Editor/EditorTools/Drawers/Base/MultiFieldDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using Better.EditorTools.Comparers;
using Better.EditorTools.Utilities;
using Better.Extensions.Runtime;
using UnityEditor;
using UnityEngine;

Expand Down Expand Up @@ -30,19 +31,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten

protected virtual Type GetFieldOrElementType()
{
var type = fieldInfo.FieldType;
if (type.IsArray)
{
return type.GetElementType();
}

var genericTypeDefinition = type.GetGenericTypeDefinition();
if (type.IsGenericType && (genericTypeDefinition == typeof(List<>) || genericTypeDefinition.IsSubclassOf(typeof(List<>))))
{
return type.GetGenericArguments()[0];
}

return type;
return fieldInfo.FieldType.GetArrayOrListElementType();
}

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"name": "com.uurha.bettereditortools",
"displayName": "Better Editor Tools",
"description": "Collection of useful tools for Unity Editor",
"version": "0.1.7",
"version": "0.2.0",
"unity": "2018.3",
"dependencies": {
"com.uurha.betterdatastructures": "0.0.4"
"com.uurha.betterdatastructures": "0.0.4",
"com.uurha.betterextensions": "0.3.1"
},
"author": {
"name": "Arcueid D'athemon",
Expand Down

0 comments on commit 6b2d620

Please sign in to comment.