Cannot debug action script with rider

CaptNChickN

New member
Hi,

When I attach Rider Editor (JetBrains Rider 2022.3.1) to unity editor to debug Assets/Behavior Designer Tutorials/BehaviorTree.unity
I got this message when I started the scene

1671656115272.png

I got this message in the Console

Code:
ArgumentException: GetComponent requires that the requested component 'Behavior' derives from MonoBehaviour or Component or is an interface.
UnityEngine.GameObject.GetComponent[T] () (at <4a31731933e0419ca5a995305014ad37>:0)
BehaviorDesigner.Editor.HierarchyIcon.HierarchyWindowItemOnGUI (System.Int32 instanceID, UnityEngine.Rect selectionRect) (at <33698a65ef7845d3aed7bcc184ec5a2e>:0)
UnityEditor.SceneHierarchy.OnRowGUICallback (System.Int32 instanceID, UnityEngine.Rect rect) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.SceneHierarchy.DoTreeView (System.Single searchPathHeight) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.SceneHierarchy.OnGUI (UnityEngine.Rect rect) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.SceneHierarchyWindow.DoSceneHierarchy () (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.SceneHierarchyWindow.OnGUI () (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.DockArea.OldOnGUI () (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

And then the scene is no more reloaded
To fix it I need to stop debugging and edit a script in rider to force rebuild the scripts

I need to debug my own custom action script, do you have any idea how I can do that?
 
Unfortunately I'm not familiar with what Rider does when attaching the debugger. That last error is really odd - the Behavior class does derive from MonoBehavior. I think that this should be a bug report for Rider. I'm able to attach the debugger without any issues in Visual Studio.
 
Indeed it's working on visual studio, I'm using Rider at my job and it's a powerful tool.
It's the first time I encounter this issue ...
 
If you download the runtime source from the downloads page it may prevent this error from occurring. I wonder if it has something to do with the assembly.
 
Perfect, it fixes the issue, we didn't get the runtime source version, previously the tutorial version was downloaded.

Thanks for the support!
 
Top