Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Question Why do non of the override methods from the agent class run for me?

Discussion in 'ML-Agents' started by yuval100amir, Jun 17, 2021.

  1. yuval100amir

    yuval100amir

    Joined:
    Dec 31, 2020
    Posts:
    3
    Methods like OnEpisodeBegin and OnActionReceived just don't run for me for some reason. When debugging with visual studio I can see that those methods are never run and even visual studio warns me this is unreachable code.

    I have over 300 lines of codes across several scripts so just pasting them here is unreasonable. I would paste the relevant parts of it but I don't know what they are so just tell me what code you want to see and I'll put it here.
     
    Last edited: Jun 19, 2021
  2. marwan_unity

    marwan_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    1
    Hey - which version of ML-Agents are you using? Also, are you trying to train one of the demo envs in ML-Agents or your own?
     
  3. yuval100amir

    yuval100amir

    Joined:
    Dec 31, 2020
    Posts:
    3
    I am on version 2.1.0 but I also had this problem when I was on 1.0.8.
    I am using my own agent.