Page 1 of 1

ParameterContainerの検索が機能せずエラーが発生する

Posted: 2021/08/29 18:15
by ryo
OS:windows8.1
Unityバージョン:2021.1.18f1
Arborバージョン:3.8.4
再現方法:
1.HierarchyよりParameterContainerを作成
2.InspectorよりIntを2個作成(名前はNew Int, New Int 0となる)
3.検索窓に触らなければ作成したパラメータは表示されていますが
「New」などを入力しても検索に何も出てこず、
エディタのコンソールにはエラーがでるようです。

NullReferenceException: Object reference not set to an instance of an object
UnityEditorInternal.ReorderableList.set_serializedProperty (UnityEditor.SerializedProperty value) (at <787760f2093d4a7bb881e33fb1e69d90>:0)
ArborEditor.ParameterContainerInternalInspector.OnInspectorGUI () (at Assets/Plugins/Arbor/Internal/Editor/Parameter/ParameterContainerInternalInspector.cs:1097)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <60f4a7b331a5480aaa94dbc2506830d5>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

以上ご報告します。

Re: ParameterContainerの検索が機能せずエラーが発生する

Posted: 2021/08/29 22:29
by caitsithware
ご報告ありがとうございます。

確認したところ再現できました。
原因としてはUnity2020.2以降のUnity側の一種のバグの可能性が高いです。

メモ
  • 検索時と通常時でReorderableListインスタンスを使いまわしている。
    検索時はReorderableList.serializedPropertyをnullにして、ReorderableList.listに検索結果の配列を設定。
  • Unity2020.2以降のReorderableList.serializedPropertyのsetで、valueのnullチェックせずにメンバーにアクセスするように変更されている
    https://github.com/Unity-Technologies/U ... st.cs#L383
  • 仮にReorderableList.listだけ設定してもserializedPropertyはnullにされないので、各プロパティのsetが意味をなさずReorderableListインスタンスを作り直すしかないのでUnityのバグの可能性が高い。
Arbor側としても回避策が取れないか検証して対応いたします。

Re: ParameterContainerの検索が機能せずエラーが発生する

Posted: 2021/08/29 23:18
by caitsithware
既知の問題へ暫定対処方法を記載いたしました。

Re: ParameterContainerの検索が機能せずエラーが発生する

Posted: 2021/08/30 03:14
by ryo
ご確認・ご対応ありがとうございました。
大変使いやすくて気に入っています。
今後ともよろしくお願いいたします。

Re: ParameterContainerの検索が機能せずエラーが発生する

Posted: 2021/09/02 10:29
by caitsithware
Arbor 3.8.5にて修正いたしました。
アセットストアから再DLし、リリースノートやreadme記載の更新手順に従って再インポートしてください。
Arbor 3.8.5 リリース | Arbor 3