grid-sensor icon indicating copy to clipboard operation
grid-sensor copied to clipboard

ArgumentNullException: Value cannot be null.

Open afzalraees opened this issue 3 years ago • 1 comments

Hi I am trying to use your scripts to make a grid sensor. I have done everything as done in your DogFight scene, but I am getting the following error- ArgumentNullException: Value cannot be null. Parameter name: key System.Collections.Generic.Dictionary2[TKey,TValue].FindEntry (TKey key) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Collections.Generic.Dictionary2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <695d1cc93cca45069c528c15c9fdd749>:0) MBaske.Sensors.Grid.DetectionResult.TryGetItems (System.String tag, System.Collections.Generic.IList`1[MBaske.Sensors.Grid.DetectionResult+Item]& items) (at Assets/Scripts/Sensors/Grid/Basic/Detection/DetectionResult.cs:109) MBaske.Sensors.Grid.GridSensorComponentBaseGO+<GetDetectedGameObjects>d__22.MoveNext () (at Assets/Scripts/Sensors/Grid/GameObject/Sensor/GridSensorComponentBaseGO.cs:165) SimpleInputControls.CollectObservations (Unity.MLAgents.Sensors.VectorSensor sensor) (at Assets/SimpleInputControls.cs:104)

Please let me know if you have any solution else let me know what other details you will require to solve this. P.S. - The error takes me here-[] Screenshot (1)

afzalraees avatar Dec 13 '22 08:12 afzalraees

Hi, please see my post https://forum.unity.com/threads/3d-grid-sensor-update-for-ml-agents-2-1.1054088/#post-8663700

mbaske avatar Dec 15 '22 09:12 mbaske