Closed patdavisgames closed 5 years ago
Seems to be linked to creating the instances and attaching agents while the game is running as agents that're in the scene when it is created do not cause an error
@harperj
@patdavisgames There are some cases where dynamically adding agents can be a problem -- I'm curious, did you manage to fix this issue? Were you trying to dynamically add / remove these agents in training or inference mode?
Thank you for the discussion. We are closing this issue due to inactivity. Feel free to reopen it if you’d like to continue the discussion though.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Just updated to version 0.8, and I'm getting this error from the MLAgents.Agent.OnEnable(). I am enabling the academy and adding the agents with brains at runtime so that may be contributing to the issue.
NullReferenceException: Object reference not set to an instance of an object at MLAgents.Agent.OnEnable () [0x00001] in C:\Users\patra\Documents\Unity\Pin Puck\Assets\ML Agents Assets\ML-Agents\Scripts\Agent.cs:330 UnityEngine.GameObject:Internal_AddComponentWithType(Type)
That's line (330) in Agent.cs var textureCount = agentParameters.agentCameras.Count+agentParameters.agentRenderTextures.Count;