ArborFSMのプレハブでSetParameterを使用すると、NullReferenceExceptionが発生する
Posted: 2023/09/13 07:14
いつもお世話になっています。
件名の不具合に遭遇したので、ご報告いたします。
OS: Windows11
Unityバージョン: 2021.3.30f1
Arborバージョン: 3.9.10
再現方法:
1. ArborFSMのプレハブを作成
2. プレハブでArborFSMをOpen Editorして、SetParameterを追加
3. Arbor Editorで何かしら値を編集すると、以下のエラーが発生する
NullReferenceException
Arbor.NodeBehaviour.get_nodeGraph () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:76)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SetupIsInGraphParameter () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:294)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SerializeVer1 () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:329)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Serialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:347)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Arbor.INodeBehaviourSerializationCallbackReceiver.OnBeforeSerialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:363)
Arbor.NodeBehaviour.UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:384)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
MissingReferenceException: The object of type 'SetParameterBehaviour' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Arbor.NodeBehaviour.get_nodeGraph () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:76)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SetupIsInGraphParameter () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:294)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SerializeVer1 () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:329)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Serialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:347)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Arbor.INodeBehaviourSerializationCallbackReceiver.OnAfterDeserialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:368)
Arbor.NodeBehaviour.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:393)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
現在は、SetParameterのかわりにCalcParameterを代用しています。
件名の不具合に遭遇したので、ご報告いたします。
OS: Windows11
Unityバージョン: 2021.3.30f1
Arborバージョン: 3.9.10
再現方法:
1. ArborFSMのプレハブを作成
2. プレハブでArborFSMをOpen Editorして、SetParameterを追加
3. Arbor Editorで何かしら値を編集すると、以下のエラーが発生する
NullReferenceException
Arbor.NodeBehaviour.get_nodeGraph () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:76)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SetupIsInGraphParameter () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:294)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SerializeVer1 () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:329)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Serialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:347)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Arbor.INodeBehaviourSerializationCallbackReceiver.OnBeforeSerialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:363)
Arbor.NodeBehaviour.UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:384)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
MissingReferenceException: The object of type 'SetParameterBehaviour' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Arbor.NodeBehaviour.get_nodeGraph () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:76)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SetupIsInGraphParameter () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:294)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.SerializeVer1 () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:329)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Serialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:347)
Arbor.ParameterBehaviours.SetParameterBehaviourInternal.Arbor.INodeBehaviourSerializationCallbackReceiver.OnAfterDeserialize () (at Assets/Plugins/Arbor/Internal/Scripts/StateMachine/ParameterBehaviours/SetParameterBehaviourInternal.cs:368)
Arbor.NodeBehaviour.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:393)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
現在は、SetParameterのかわりにCalcParameterを代用しています。