{"id":13658625,"url":"https://github.com/exodrifter/unity-python","last_synced_at":"2025-04-24T11:32:34.965Z","repository":{"id":73695497,"uuid":"44448724","full_name":"exodrifter/unity-python","owner":"exodrifter","description":"Python plugin for Unity3D.","archived":false,"fork":false,"pushed_at":"2022-02-05T23:49:59.000Z","size":22848,"stargazers_count":350,"open_issues_count":0,"forks_count":93,"subscribers_count":44,"default_branch":"master","last_synced_at":"2024-11-10T12:42:34.014Z","etag":null,"topics":["python","unity3d"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exodrifter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-10-17T18:12:43.000Z","updated_at":"2024-09-29T14:47:12.000Z","dependencies_parsed_at":"2024-02-29T05:47:32.448Z","dependency_job_id":null,"html_url":"https://github.com/exodrifter/unity-python","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exodrifter%2Funity-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exodrifter%2Funity-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exodrifter%2Funity-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exodrifter%2Funity-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exodrifter","download_url":"https://codeload.github.com/exodrifter/unity-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250618581,"owners_count":21460120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","unity3d"],"created_at":"2024-08-02T05:01:01.207Z","updated_at":"2025-04-24T11:32:33.769Z","avatar_url":"https://github.com/exodrifter.png","language":"Python","readme":"# Warning\n**This repository is no longer maintained.** This repository will not be\nupdated and I will not respond to support requests. There are a few reasons\nfor why this is:\n\n* Python 2 was deprecated on January 1, 2020.\n* As of this writing, IronPython does not have a stable release for Python 3.\n* Updating to newer versions of IronPython for Python 2 does not appear to be\n  straightforward as IronPython links against newer versions of DLLs that\n  Unity uses.\n* pip dropped support for Python 2 in January 2021\n* I no longer use Unity.\n\nThis makes it difficult for me to keep the repository up to date and provide\nsupport. If you are interested in taking over, I would recommend putting\nyour energy towards moving to Python 3 using IronPython 3 instead of\ncontinuing to use IronPython 2. Let me know if this is what you would like to\ndo; I can provide some limited advice based on my experience making this\nlibrary and I can redirect users to your library when it's ready.\n\n\n# UnityPython\nUnityPython is a plugin for Unity3D that provides support for running Python\n2.x code in Unity3D on any platform which supports `System.Reflection.Emit`.\n\nSpecial thanks to the developers of IronPython who developed the open-source\nintegration of Python and .NET, which this plugin uses.\n\n\n## Requirements\nThe build target must support `System.Reflection.Emit`. In the Unity3D docs, you\ncan find an up-to-date detailed list of which platforms support `Emit` or not\n[here](https://docs.unity3d.com/Manual/ScriptingRestrictions.html).\n\nAs of Unity3D 2019.4 LTS, here is a chart of platform support for `Emit`:\n| Platform (scripting backend)        | Is `System.Reflection.Emit` supported? |\n|-------------------------------------|----------------------------------------|\n| Android (IL2CPP)                    | No                                     |\n| Android (Mono)                      | Yes                                    |\n| iOS (IL2CPP)                        | No                                     |\n| PlayStation 4 (IL2CPP)              | No                                     |\n| PlayStation Vita (IL2CPP)           | No                                     |\n| Standalone (IL2CPP)                 | No                                     |\n| Standalone (Mono)                   | Yes                                    |\n| Switch (IL2CPP)                     | No                                     |\n| Universal Windows Platform (IL2CPP) | No                                     |\n| Universal Windows Platform (.NET)   | Maybe\\*                                |\n| WebGL (IL2CPP)                      | No                                     |\n| WiiU (Mono)                         | Yes                                    |\n| XBox One (IL2CPP)                   | No                                     |\n\n\\* Unconfirmed, as Unity states that UWP (.NET) uses a \".NET Core class\n   libraries subset\" but fails to state what libraries are included in that\n   subset. If you know the answer to this question, please open a PR.\n\n\n## Setup\nThere are three different ways to use this library in Unity:\n* Use the `Add package from git URL...` option in Unity's package manager and\n  use the git URL of this repository.\n* Clone this repository into your Unity project. Or, if your Unity project is\n  already a git repository, add this repository as a submodule.\n* Download and install the latest [`.unitypackage` release][releases]\n\nThen, go to `Edit \u003e Project Settings \u003e Player \u003e Other Settings \u003e Configuration`\nand change `Api Compatability Level` to \".NET 4.x\"\n\n\n## Usage\nAn example is provided below. More examples can be found in the\n`Examples/` folder.\n\n\tusing UnityEngine;\n\tusing IronPython.Hosting;\n\n\tpublic class HelloWorld : MonoBehaviour\n\t{\n\t\tvoid Start()\n\t\t{\n\t\t\tvar engine = Python.CreateEngine();\n\t\t\tvar scope = engine.CreateScope();\n\n\t\t\tstring code = \"str = 'Hello world!'\";\n\n\t\t\tvar source = engine.CreateScriptSourceFromString(code);\n\t\t\tsource.Execute(scope);\n\n\t\t\tDebug.Log(scope.GetVariable\u003cstring\u003e(\"str\"));\n\t\t}\n\t}\n\n\n[releases]: https://github.com/exodrifter/unity-python/releases\n[discussions/36]: https://github.com/exodrifter/unity-python/discussions/36\n","funding_links":[],"categories":["Open Source Repositories","Python","Open Source Packages"],"sub_categories":["Scriptings"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodrifter%2Funity-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexodrifter%2Funity-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodrifter%2Funity-python/lists"}