Skip to content

Conversation

@Kyrela
Copy link
Contributor

@Kyrela Kyrela commented Jun 1, 2025

Fix #290
The documentation changes have been submitted at Dinomite-Studios/unity-azure-pipelines-tasks-docs#20

Problem

I've been using this script in a professional environment and have encountered a specific situation where I essentially have to create an asynchronous task to wait for Unity to finish some background processes.

The problem is that when buildScriptType is set to existing, the -quit argument is appended to the Unity command, causing Unity to close before my method is actually completed.

Solution

This PR adds a scriptCompletionQuit option that is optional and defaults to the current behavior (automatically quitting after the method is completed).

Those who want to perform advanced actions with their method can set it to false, and are responsible for closing Unity from the desired location, at the desired time.

@FejZa
Copy link
Member

FejZa commented Jun 2, 2025

This is a great addition @Kyrela and has been requested a couple of times by users. Just hadn't gotten around adding it. I will make it part of the next release and will let you know!

@FejZa FejZa merged commit b74c128 into Dinomite-Studios:main Jun 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using buildScriptType: existing adds -quit argument automatically. Quitting early in cases which use EditorApplication.Exit(0);

2 participants