简体   繁体   中英

IronPython (for .NET 4.x) integration with Unity

I am trying to integrate a python script with my Unity application using Visual Studio 2017. I have followed all the steps given in the various online tutorials, and this is my code: image

Also, when I go to the Unity inspector, this is the error seen when I select the dll (saved in Assets/Editor/plugins/resources directory): image2 I have installed the latest version of IronPython which states that it is compatible with .NET 4.x as well as 3.5.

Could someone please suggest a fix for this, or some other alternative to use for Python integration?

The error message is telling you that your editor is incompatible with the .NET version you are using. You may wish to update your path to include both the .NET 3.5 and 4.0 versions.

Unity includes an experimental runtime version that supports .NET 4.6, but it is not the default. To select this choose Edit -> Project Settings -> Player . Then in the Inspector Window scroll down to Other Settings -> Configuration -> Scripting Runtime Version . Select Experimental (.NET 4.6 Equivalent) from the menu.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM