Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

HELP I am struggling with the MLAgents tutorial.

Discussion in 'ML-Agents' started by bewarejoki, Mar 12, 2022.

  1. bewarejoki

    bewarejoki

    Joined:
    Mar 12, 2022
    Posts:
    1
    Hello! I am totally new to Python and C#. I am currently trying to follow this tutorial: and I am having Struggles with getting the C# Script to run properly.
    I am not able to add any Agents or at least visual studio doesn't recognize it as a class.

    I don't know if I am making much sense here, but help is greatly appreciated!
     
  2. JulesVerny

    JulesVerny

    Joined:
    Dec 21, 2015
    Posts:
    47
    If C# is not recognising any ML Agents Class, that suggest that you have not fully Imported the ML Agents package into your Unity Project properly.

    You need to ensure that the installation of com.unity.ml-agents package has been imported from the Package Manager. See the instructions for importing from the Package Manager. Your Project directory should then have a number directories of run time files including sensors, actuators and agents.

    You should be able to create a file, and "using Unity.MLAgents" at the top of your script should work, and then you should be able then to create a new class that inherits from the Agent class and implement the Agent methods.
     
  3. simonedinome_unity

    simonedinome_unity

    Joined:
    Feb 6, 2023
    Posts:
    1
    I have still this problem and I cant figure out. How did you solve this?
     
  4. Eugenvasilachi

    Eugenvasilachi

    Joined:
    Dec 12, 2023
    Posts:
    1