Closed tim-altitudegames closed 5 months ago
Unfortunately, this feature requires some heavy work.
For most of the time, you can always use Odin together with SaintsField, as long as you
The difficulty of this feature is, Unity does not naturally allow to make a "list/array drawer" with a CustomPropertyDrawer
way, but only allows on UnityEditor.Editor
way. Which means this feature requires to completely re-write Unity's reorder-able list rendering (like what Odin did). Some other workaround is to hijack the property drawer for first element of array/list and ignore the rest element (like how Editor GUI Table did)
So, in short, I'll only re-consider it again after I finish some other features for this project. Before that I'll leave this issue open for now.
Any suggestion & PR is welcome!
@tim-altitudegames Hi,
Please check version 3.1.1 and ListDrawerSettings document
This issue is closed as implemented. However, this component is quite heavy so is expected to have some bugs. Feel free to report issues if you find any problems.
using SaintsField.Playa;
[Serializable]
public struct MyData
{
public int myInt;
public string myString;
public GameObject myGameObject;
public string[] myStrings;
}
[ListDrawerSettings(searchable: true, numberOfItemsPerPage: 3)]
public MyData[] myDataArr;
Something I'd love to see is support for the
[Searchable]
attribute for lists/arrays, helps deal with sizeable entities in the inspector