mbaske / grid-sensor

Grid Sensor Components for Unity ML-Agents
MIT License
134 stars 28 forks source link

ArgumentNullException: Value cannot be null. #16

Open afzalraees opened 1 year ago

afzalraees commented 1 year ago

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+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)

mbaske commented 1 year ago

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