Custom Scripts (beta)
Use Custom Scripts to add your own code and create custom pipelines.
Read time 2 minutesLast updated 2 days ago
You can provide code tailored to your needs. The following apps support Custom Scripts:
- Linux Shell
- Python
- Blender
- Enter custom code in the built-in editor, and execute it with command-line arguments (optional).
- Fetch a script from a script library and execute it with command-line arguments (optional).
Prerequisites
You can access Custom Scripts when you create or edit a pipeline.Enter custom script code
To enter your custom code:- Sign in to your Unity Dashboard account.
- In the side navigation bar, select Pipeline Automation > Pipelines. You can create or edit a pipeline.
- In the pipeline builder, add a step. The Select an action from app dialog opens.
- Select the Python app.
- Select the Run Custom Script action.
- Select Add Action. In the Step Parameters tab, the Custom Scripts section appears in the Inputs section.
- Enter your code in the built-in editor or select Browse Files to upload a script file from your local drive. The script code from your file appears in the built-in editor.
- Enter Command Line Arguments to pass as pipeline inputs.
- Select Save.
Fetch and run a custom script
To run a script in this way, ensure the script exists in the job’s storage. First download it from a source such as Unity Asset Manager or Unity Version Control. The output of an action that downloads files includes parameters that locate the downloaded script path. You must provide this path to actions that run script files. To fetch and run a custom script file:- Sign in to your Unity Dashboard account.
- In the side navigation bar, select Pipeline Automation > Pipelines. You can create or edit a pipeline.
- In the pipeline builder, add a step. The Select an action from app dialog opens.
- Select the Python app.
- Select the Run Custom Script File action.
- Select Add Action. In the Step Parameters tab, the Custom Scripts section appears in the Inputs section.
- In the Script Path field, select Download file – Download Directory and enter the script file name, for example, .
/scriptexample.py
- Enter Command Line Arguments to allow the script to receive parameters generated by the pipeline.
- Select Save.