‘error loading native library’ means that it’s unable to load the mlagents plugin dll.
You don’t need to look into the c# code, or your inspector, since the mlagents plugin dll didnt even load, so won’t get as far as looking at those.
The issue is more likely to revolve around some kind of incompatibility between the plugin dll and your system.
What kind of system are you running? I’m going to guess it’s a Silicon Mac? Which is not to say that mlagents won’t work on a silicon mac, cos I have one. I’m going to guess the native library that fails to load is: google protobuf native library. It’s often a little precocious…
The plugins are all in your packages/mlagents folder:
You’ll want to go through each of these, and ensure they’re loading ok.
If you’re on silicon, … hmmm… weirdly I have a ton of these set to intel x86, which seems odd. But I reckon the one that is likely crashing is grpc native. You should have the following I feel:
Hey thanks for answering, turns it was probably because my user folder name contained non ascii characters, after renaming it and doing factory restart and doing the whole installation again it works now!
One thing I found, that could help others: ML Training in build won’t work if you try to use IL2CPP compiler. So, make sure your project is set to Mono.
Thank you so much you have saved my day and finally I got this thing working!
I changed all the Platform settings in Plugin folder (and all the subfolders) and then found out I missed a few of them. They are hiding somewhere like this: