Search Unity

Question ML agents installation

Discussion in 'ML-Agents' started by eryberto87, May 8, 2022.

  1. eryberto87

    eryberto87

    Joined:
    May 2, 2022
    Posts:
    3
    I have problems installing th ML agents.
    I am a complete beginner with Unity.
    The main problem is that either I have none of the examples in my project, either I have them but multiple errors pop up like "error cs0234: the type or namespace name 'inputsystem' does not exist in the namespace 'unityengine' (are you missing an assembly reference?) site:forum.unity.com"

    Here the things that I tried maybe someone can spot what I did wrong:

    1. Installed Unity, last version (Unity 2021.3.1f1)

    2. Opened a new 3d Project

    3. Installed ML Agent from the package Manager 2.0.1

    4. Downlaoded release 19 from Github, installed the extension package via Package manager-->add package from disk-->package.json(inside the folder com.unity.ml-agents).

    When I stopped here, no example avalable.

    5. I also tried after previous steps to drag and drop the MLAgents folder from the package extension( C:\...\ml- agents-release_19\ml-agents-release_19\Project\Assets), that's when the "error cs0234: the type or namespace name 'inputsystem' does not exist in the namespace 'unityengine' (are you missing an assembly reference?) site:forum.unity.com" pops up (actually 6 of them).

    6. Looked for a solution for this error found that I need to install "Input System" through the package manager, did that, 4 errors resolved, but still 2 remaining.

    A. first error: Assets\ML- Agents \Examples \PushBlockWithInput \Scripts \PushBlockWithInputPlayerController.cs (1,22) : error CS0234: The type or namespace name 'Extensions' does not exist in the namespace 'Unity.MLAgents' (are you missing an assembly reference?)

    B. second error: Assets\ML-Agents\ Examples\ PushBlockWithInput\ Scripts\ PushBlockWithInputPlayerController.cs (21,66): error CS0246: The type or namespace name 'IInputActionAssetProvider' could not be found (are you missing a using directive or an assembly reference?)

    Hope that someone can help me, I spent too many hours trying to solve this.
     
  2. iffalseelsetrue

    iffalseelsetrue

    Joined:
    May 3, 2018
    Posts:
    11
    Hello, I know it can be time consuming to get everything right, we've been there, just keep trying.

    So in order to access the examples, you need to download the repository,

    and then open unity hub and open the project folder here:

    ml-agents/Project/

    and then in the unity editor, open the scenes in here:

    ml-agents/Project/Assets/ML-Agents/Examples/

    for 3Dball is in here

    ml-agents/Project/Assets/ML-Agents/Examples/3DBall/Scenes/

    maybe check out the examples first and watch some fundamental tutorials on unity first before diving into ML agents.
     
    Nyabingi, EzraHuffman and shyamarama like this.