Skip to main content

A Unity3d installation finder and a command line helper.

Project description

funity

A Unity3d installation finder and command line helper.

Installation

pip install funity

Usage

In Terminal

python -m funity

# Outputs a JSON-formatted file containing all Unity3d editors found in the current working directory.

# editor.cache
# [
#   "/Applications/Unity/Hub/Editor/2019.2.6f1"
# ]

In Python

from funity import *


editors = UnityEditor.find_all()

editor = editors[0]

project = UnityProject('/Users/you/Projects/HelloWorld')

return_code = editor.run(
    '-projectPath', str(project),
    '-buildTarget', 'Win64',
    '-executeMethod', 'BuildPlayerCommand.Execute',
    cli=True,  # Shorthand for '-batchmode', '-nographics', '-quit', '-silent-crashes'.
    log_func=lambda l: print(l, end='')  # Prints all logs from Unity.
)

Changelog

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

funity-0.0.3-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

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