Skip to main content

Control Unity from Python!

Project description

Peaceful Pie

Connect Python with Unity for reinforcement learning!

CI

CircleCI

Installation

You need to install both into Unity project, and into your Python environment.

In Unity

  • in Unity, in your project's "Assets" folder, create a "Plugins" folder, if it doesn't already exist
  • First install AustinHarris.JsonRPC:
    • Download https://www.nuget.org/api/v2/package/AustinHarris.JsonRpc/1.2.3
    • rename to have filename suffix be .zip (you might need to turn on options to see all file extensions)
    • unzip the resulting zip file
    • copy lib/netstandard2.1/AustinHarris.JsonRpc.dll into your Plugins folder
    • select the file, in your Plugins, and in 'Inspector' unselect 'validate references', and click 'Apply'
  • click on the green badge under 'CI' above
    • click on 'build' in the first row with a green 'Success' badge
    • click on the 'build-dotnet' box, that shows a white tick in a green circle
    • click on 'artifacts' tab
    • click on 'PeacefulPie/bin/Debug/netstandard2.1/PeacefulPie.dll', to download it
  • copy PeacefulPie.dll into your Unity project's Plugins folder
  • if on Mac silicon:
    • in Unity, goto Plugins, click on PeacefulPie.dll
    • in Inspector, change 'CPU' setting from 'Intel' to 'Any CPU', then click 'Apply'
    • do the same for AustinHarris.JsonRpc.dll

You should be good to go :)

In Python

pip install -U peaceful-pie

Requirements

  • currently tested with:
    • python 3.10
    • Unity 2021.3.16.f1
  • please create an issue if your preferred platform is not supported (I'm guessing I might need to downgrade Python a little? Let me know!)

Dev

I'm usng Visual Studio for Mac to write this.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peaceful_pie-0.7.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

peaceful_pie-0.7.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file peaceful_pie-0.7.0.tar.gz.

File metadata

  • Download URL: peaceful_pie-0.7.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for peaceful_pie-0.7.0.tar.gz
Algorithm Hash digest
SHA256 660408f922685a12264ce39591e0f666bfbb2f3d9381bd1c7e6529b654d97c2b
MD5 e41669a477383c73bc6e9464d0913648
BLAKE2b-256 abba6b4a2c4fa662cef13fd4fb40da107576468b2bd7f8eced8210b8c6f46165

See more details on using hashes here.

File details

Details for the file peaceful_pie-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for peaceful_pie-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae6c2de7c5e06cd040c34bac611a3a64fd38ce2d1dadf29a33e381effb5c1c48
MD5 a75e0201a4ed89d8d2a9522f8585d380
BLAKE2b-256 5e4a5b7a874f92bfaf16b5f067dd04ac976089490ab59f3c34180b2553cb7492

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page