Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Official Python for Unity release announcements

Discussion in 'Formats & External Tools Previews' started by markvi, Mar 30, 2021.

Thread Status:
Not open for further replies.
  1. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    This thread will be updated each time a new version of the Python for Unity package becomes available.

    For more information about Python for Unity, please have a look at our documentation.

    Please create a new thread for feature requests, bug reports, or general discussion using the python tag. For bug reports in particular, it helps us immensely if you prepare a minimal project that reproduces your issue. Submit a bug report using the Unity Bug Reporter and include the id you receive (via email) in your post.
     
    BackgroundMover and tran10 like this.
  2. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    We are thrilled to announce that Python for Unity 4.0.0-exp.5 is now available!

    Python for Unity integrates the Python programming language with Unity, so that you can adapt your studio's existing pipeline scripts:
    • Automate scene and sequence assembly in the context of using Unity as a real-time renderer.
    • Automate time consuming tasks like duplicating or modifying a large quantity of Assets.
    • Author custom editor tools that could both use complex UI elements and interact natively with other DCC suites.
    Python for Unity provides:
    • A Python Script Editor window principally aimed at Technical Artists who want to run short scripts and easily create new menu items that run Python code.
    • An API aimed at Pipeline Technical Directors who want to call studio scripts implemented in Python from C# and vice versa.
    • Project Settings.
    • Installing and loading Pip Packages.

    4.0.0-exp.5 is a major upgrade from our last public release, and incorporates a large number of changes. In summary:
    • Based on Python 3.7; scripts based on Python 2.7 will need to be ported.
    • Users no longer need to install Python on their system.
    • In-process Python is no longer reinitialized when the Unity domain reloads.
    • Removed the out-of-process API. The PySide example now runs in-process and is much simpler.
    • Limited support for a virtual environment workflow via the ProjectSettings/requirements.txt file.
    • Many bug fixes.
    Documentation for the Python for Unity package is available here, and the full changelog can be found here.

    This is an experimental release, and thus is not visible in Package Manager. To install this package, open Package Manager, click the + at the top left and select Add package by name.... Enter com.unity.scripting.python as the name and and 4.0.0-exp.5 as the version and click Add. Alternatively, you may edit Packages/manifest.json and add "com.unity.scripting.python": "4.0.0-exp.5", to the list of dependencies, or edit the existing entry for Python for Unity to update the version.

    Python for Unity is built on the open source Python for .NET project. We are indebted to the maintainers: thank you Amos, Benedikt, and Victor!

    > How to report bugs <

    Edit 2021/09/20: A bug prevents the package from automatically installing the Python binaries package for the current platform. You can manually install the binaries for your platform using Add package by name... and entering either com.unity.scripting.python.windows or com.unity.scripting.python.macos. This issue will be fixed in an upcoming release.
     
    Last edited: Sep 20, 2021
  3. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    Python 4.0.0-pre.1 has been released and is a pre-release package in Unity 2022.1.

    You can find the CHANGELOG here and full documentation here.

    To install this package:

    In Unity 2022.1, open the Project Settings, select Package Manager, and check the "Enable pre-release package" checkbox. Python for Unity will now be visible in the Package Manager.

    In Unity 2019.4+, open the Package Manager, click the + button at the top left and select Add package by name.... In the popup that appears, enter com.unity.scripting.python in the Name field and click Add.
     
    bobby55, esun_unity and anonymous-vae like this.
Thread Status:
Not open for further replies.