Page 1 of 1

ParameterCheckでParameterがintしか選べない

Posted: 2019/05/02 12:53
by Guest
Unity 2018 3.13.f1
Arbor3.5.1
Windows 10 Home
ビルドプラットフォーム PC,Mac&Linux Standalone

ParameterCheckにfloatやbool(ほかの型は試してませんがおそらくint以外)を選ぶと
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <d7ac571ca2d04b2f981d0d88
とエラーがでて選択することができないです。

再現方法
1.Unity 2018 3.13.f1でTestという名前で3DのUnityProjectを作成
2.Asset StoreウィンドウからArborをインポート
3.CubeをCreateしBehavior Treeコンポーネントをアタッチ
4.OpenEditorでエディターを開く
5.CubeにparameterContainerをアタッチ New Floatという名前のFloatパラメーターを追加
6.Rootからノードを伸ばしてAgentEscapeFromPositionアクションを作成
7.ParameterCheckデコレーターを追加しParameterContainerをドラッグアンドドロップしNew Floatを選択しようとするとエラー発生

お忙しいとは思いますが確認をお願いいたします。

Re: ParameterCheckでParameterがintしか選べない

Posted: 2019/05/02 13:44
by caitsithware
ご報告ありがとうございます。

再現確認取れましたので修正いたします。

不具合の影響範囲:

ParameterConditionListを使用している箇所で、参照するパラメータのタイプが変更されたときに発生します(内部的にデフォルトはint型扱い)

【ParameterConditionListを使用している組み込みスクリプト】
  • ArborFSM
    • ParameterTransition
  • BehaviourTree
    • ParameterCheck
    • ParameterConditionalLoop
暫定対処方法:

暫定対処として、以下のようにコードを変更していただければint型以外のパラメータも設定できました。
  • Assets/Plugins/Arbor/BuiltInBehaviours/Editor/Common/ParameterConditionListPropertyDrawer.csをコードエディタで開く。
  • 134行目あたりを以下のコードに変更。

    Code: Select all

    OnChangeParameterType(conditionProperty, oldParameterType, parameterType);
    return; // 追加
    
ご不便おかけして申し訳ございません。
修正までの間、一時的に上記暫定対処方法をお試しください。

Re: ParameterCheckでParameterがintしか選べない

Posted: 2019/05/02 13:53
by Guest
素早いご対応ありがとうございます。
仰った対処方法をこちらでも適応したところ不具合がなおりました。

Re: ParameterCheckでParameterがintしか選べない

Posted: 2019/05/02 13:57
by caitsithware
ご確認ありがとうございます。

追記となりますが、関連不具合として、ParameterContainerの参照タイプをDataSlotにし、ParameterTypeを変更した場合も同様の例外が発生しております。

暫定対処方法:

こちらにつきましても、以下暫定対処方法で一時的に回避できます。
  • Assets/Plugins/Arbor/BuiltInBehaviours/Editor/Common/ParameterConditionListPropertyDrawer.csをコードエディタで開く。
  • 150行目あたりを以下のコードに変更。

    Code: Select all

    OnChangeParameterType(conditionProperty, oldParameterType, parameterType);
    
    conditionProperty.referenceType = null;
    
    return; // 追加
    
ご不便おかけして申し訳ございませんが、修正までしばらくお待ちください。