arcadia-unity / Arcadia

Clojure in Unity
http://arcadia-unity.github.io/
Apache License 2.0
1.68k stars 108 forks source link

Can I use Arcadia with Unity/MLAgents? #383

Closed lccambiaghi closed 3 years ago

lccambiaghi commented 3 years ago

Hi, I have successfully used Arcadia in a project with a "standard" project structure by cloning the repo into the Assets folder.

I am trying to use it with the MLAgents project: https://github.com/Unity-Technologies/ml-agents .

The project is structured like so:

.
|-- Project
|   |-- Assets
|   |   |-- ML-Agents
|   |   |   |-- Examples
|   |   |   |   |-- 3DBall
|   |   |   |   |   |-- Scenes
|   |   |   |   |   |-- Prefabs

Where should I clone the repo for it to work? I tried both in the Assets and in the 3DBall folder without success.

This is the error message printed in the console:

Assets/ML-Agents/Examples/3DBall/Arcadia/Components/ArcadiaBehaviour.cs(366,9): error CS0252: Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'Keyword'
Assets/ML-Agents/Examples/3DBall/Arcadia/Components/ArcadiaBehaviour.cs(387,8): error CS0252: Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'Keyword'
lccambiaghi commented 3 years ago

Ok, the solution was pretty simple: I added the suggested casts and Arcadia started as expected!