I have the following custom Action.
I want to use Unity's Test Framework so I need to put my code under an .asmdef file.
However, if I do this I get the following exception when selecting the PrepareAttack node in my BT.
Is there any viable workaround or is a solution coming anytime soon?
LE: I'm using Behavior Designer Pro
C#:
public class PrepareAttack : Action {
[SerializeField] private SharedVariable<Unit> _attacker;
[SerializeField] private SharedVariable<AttackConfig> _attack;
public override void OnStart() {
_attacker.Value.PrepareAttack(_attack.Value);
}
}
I want to use Unity's Test Framework so I need to put my code under an .asmdef file.
However, if I do this I get the following exception when selecting the PrepareAttack node in my BT.
NullReferenceException: Object reference not set to an instance of an object
Opsive.GraphDesigner.Editor.Controls.SharedVariableControl.AddSharedVariables (Opsive.GraphDesigner.Runtime.Variables.ISharedVariableContainer container, Opsive.GraphDesigner.Runtime.Variables.SharedVariable sharedVariable, System.Boolean showAllVariables, System.Type overrideType, System.Collections.Generic.List`1[T] list, System.Int32& selectedIndex) (at <73590e06fe294f17bc5aca88bb8555c9>:0)
Opsive.GraphDesigner.Editor.Controls.SharedVariableControl.GetAllSharedVariables (Opsive.GraphDesigner.Runtime.IGraph graph, Opsive.GraphDesigner.Runtime.Variables.SharedVariable sharedVariable, System.Boolean addDynamicSelection, System.Type overrideType, System.Int32& selectedIndex) (at <73590e06fe294f17bc5aca88bb8555c9>:0)
Opsive.GraphDesigner.Editor.Controls.SharedVariableControl.GetControl (Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase+TypeControlInput input) (at <73590e06fe294f17bc5aca88bb8555c9>:0)
Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase.GetTypeControl (Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase+TypeControlInput input) (at <beaa6e8967b54621bd6004fdfbefb407>:0)
....
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <e9dc32e8e55e45caa0a2bc53fe1a1c13>:0)
Is there any viable workaround or is a solution coming anytime soon?
LE: I'm using Behavior Designer Pro