docs.unity3d.com
Version: 

    Python SDK

    Prerequisites

    • Compatible system
    • Python 3.1 minimum. 3.10 or newer recommended
    • A valid Pixyz SDK license on your Pixyz license portal

    Setup

    PyCharm

    1. Download SDK from archive
    2. Open project
    3. Locate your Pixyz SDK binaries folder on your machine or local dev environement
    4. Add Pixyz binaries folder to your interpreter path (check PyCharm documentation)

    1. Setup your license server
    2. Run your first script

    Visual Studio Code

    1. Download SDK from archive
    2. Open project
    3. Create a Python environment
    4. Set PYTHONPATH to the Pixyz binaries folder path (by adding an .env file to the project for example)
    5. Setup your license
    6. Run your first script

    Run your first script

    import pxz
    from pxz import core
    
    # init Pixyz
    pxz.initialize()
    
    # print Pixyz version
    print(core.getVersion())
    
    # set log level to INFO so you can see the logs in the console
    core.configureInterfaceLogger(True, True, True)
    core.addConsoleVerbose(core.Verbose.INFO)
    
    # if no license is found, try to configure a license server
    if not core.checkLicense():
        core.configureLicenseServer("company-server-hostname", 27000, True)
    
    # add all tokens
    for token in pxz.core.listTokens():
        try:
            core.needToken(token)
        except:
            pass
    
    # use io.importScene to import a file and enjoy :)
    
    Version 2024.2.2.3
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.