Page 1 of 1

Waypointでリスト要素を削除すると余分に削除される

Posted: 2018/09/17 09:39
by kudou
Unityバージョン
 unity 2018 1.0 f2
Arborバージョン
 arbor3.2.4
OS
 windows8.1
ビルドプラットフォーム
 unity editor
再現方法
 Waypoint のリスト要素を削除する
再現プロジェクト(Arborや他アセットなどを含まない最小構成)もしくは動画
 Image

Re: Waypointでリスト要素を削除すると余分に削除される

Posted: 2018/09/17 11:06
by kudou
この件ですが、要素が none ではない場合は指定されている要素のみ削除されます。
Image

Re: Waypointでリスト要素を削除すると余分に削除される

Posted: 2018/09/17 11:13
by caitsithware
ご報告ありがとうございます。

Transformを指定していない要素を削除すると次の要素も削除されるようになっていました。
次回更新の際に修正いたします。

修正までの間、以下の暫定対処を行っていただければと思います。

暫定対処:
  • Assets/Plugins/Arbor/BuiltInBehaviours/Editor/Components/WaypointInspector.csを開く。
  • 36行目あたりで以下コードを見つける。

    Code: Select all

    _PointsList.onRemoveCallback = (list) =>
    {
        pointsProperty.DeleteArrayElementAtIndex(list.index);
        pointsProperty.DeleteArrayElementAtIndex(list.index);
    };
  • 以下コードに変更する。

    Code: Select all

    _PointsList.onRemoveCallback = (list) =>
    {
        int index = list.index;
        SerializedProperty property = pointsProperty.GetArrayElementAtIndex(index);
        if (property.objectReferenceValue != null)
        {
            pointsProperty.DeleteArrayElementAtIndex(index);
        }
        pointsProperty.DeleteArrayElementAtIndex(index);
    };
ご不便おかけして申し訳ございませんが、よろしくお願いいたします。