docs.unity3d.com
Version: 

    Set up

    Prerequisites (Python SDK)
    • Python 3.1 or above
    Configure IDE (Python SDK)
    PyCharm
    • Create a new project
    • Add Pixyz binaries folder to your interpreter path (check PyCharm documentation)
    Visual Studio Code
    • Create a new project
    • Create a Python environment
    • Set PYTHONPATH to the Pixyz binaries folder path (by adding an .env file to the project for example)
    Activate the license and initialize the SDK

    You must initialize the Pixyz SDK and bind it to a valid license.

    • Python
    • C#
    import pxz
    from pxz import core
    ​
    # init Pixyz
    pxz.initialize(productName, validationKey)
    ​
    # 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("lics-it-gcp-p01", 27005, True)
    
    # add all tokens
    for token in pxz.core.listTokens():
        try:
            core.needToken(token)
        except:
            pass
    
    // init Pixyz
    PiXYZAPI pxz = PiXYZAPI.Initialize(ProductName, ValidationKey);
    
    // if no license is found, try to configure a license server
    if (!pxz.Core.CheckLicense()) {
        pxz.Core.ConfigureLicenseServer("lics-it-gcp-p01", 27005, true);
    }
    
    // add all tokens
    foreach (var token in pxz.Core.ListTokens().list) {
        try {
            pxz.Core.NeedToken(token);
        }
        catch { /* catch silently*/ }
    }
    
    Version 2024.2.0.26
    • 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.