Array resize not work with ListDrawerSettingsAttribute.CustomRemoveIndexFunction

Issue #609 resolved
Yuta Nakamura created an issue

Thank you for a great plugin. Odin Inspector is essential to my unity project.

1. What happened?

Array resize not work with ListDrawerSettingsAttribute.CustomRemoveIndexFunction
Is this in the specifications?

2. How can we reproduce it?

  • Create C# Scripts And Copy & Paste Test Code.
  • Right click > Create > Test > ScriptableObjectTest
  • Click to add contents(+)
  • Click to remove contents(x)

Remove not work.

3. If screenshots would help explain or demonstrate your issue, please include these.

This is minimum test code.

using UnityEngine;
using Sirenix.OdinInspector;
using System.Linq;

[CreateAssetMenu(menuName = "Test/ScriptableObjectTest")]
public sealed class ScriptableObjectTest : ScriptableObject
    [ListDrawerSettings(CustomRemoveIndexFunction = "CustomRemoveIndexFunction")]
    public string[] ItemNames;

    void CustomRemoveIndexFunction(int index) => ItemNames = ItemNames.Where((v, i) => i != index).ToArray();

Delete Button is not work.

4. What version of Unity are you using?
Unity 2018.4.11f1 & 2019.2.17f1

5. What version of Odin are you using?
Odin 2.1.8

6. Do you have Editor Only mode enabled?
Editor Only mode is Disabled.

7. What operating system are you on?
Mac OS Mojava 10.14.6

Comments (4)

  1. Tor Esa Vestergaard

    Resolved in upcoming patch 3.0.4 - a build with the fix included can be provided upon request if you contact me on Discord. Thanks for the poke about this issue on Discord :)

  2. Log in to comment