Skip to content

Commit 6af26d3

Browse files
authored
Make sure create project task adds a new empty scene to the project (#285)
1 parent a212019 commit 6af26d3

File tree

10 files changed

+20
-8
lines changed

10 files changed

+20
-8
lines changed

Tasks/UnityActivateLicense/UnityActivateLicenseV1/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build": "tsc",
88
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
910
"dev-refresh": "npm run dev-delete && npm run dev-upload",
1011
"dev-delete": "tfx build tasks delete --task-id 13159b9a-b7ba-4977-922c-2b5cb63c90df",
1112
"dev-upload": "npm run build && npm run upload"

Tasks/UnityBuild/UnityBuildV3/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build": "tsc",
88
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
910
"dev-refresh": "npm run dev-delete && npm run dev-upload",
1011
"dev-delete": "tfx build tasks delete --task-id 64e90d50-a9c0-11e8-a356-d3eab7857116",
1112
"dev-upload": "npm run build && npm run upload"

Tasks/UnityCMD/UnityCMDV1/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build": "tsc",
88
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
910
"dev-refresh": "npm run dev-delete && npm run dev-upload",
1011
"dev-delete": "tfx build tasks delete --task-id f357416a-9646-4cd6-9d96-e2f2a9574ce6",
1112
"dev-upload": "npm run build && npm run upload"

Tasks/UnityCreateProject/UnityCreateProjectV1/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/UnityCreateProject/UnityCreateProjectV1/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"main": "unity-create-project.js",
66
"scripts": {
77
"build": "tsc",
8-
"test": "nyc mocha test/_suite.js",
98
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
10+
"dev-refresh": "npm run dev-delete && npm run dev-upload",
1011
"dev-delete": "tfx build tasks delete --task-id 874bd610-5219-45e4-a917-59e3a7ff74da",
1112
"dev-upload": "npm run build && npm run upload"
1213
},
@@ -19,7 +20,7 @@
1920
"dependencies": {
2021
"@types/node": "^22.9.1",
2122
"@types/q": "^1.5.8",
22-
"@dinomite-studios/unity-azure-pipelines-tasks-lib": "^1.0.11",
23+
"@dinomite-studios/unity-azure-pipelines-tasks-lib": "^1.0.12",
2324
"azure-pipelines-task-lib": "^4.17.3"
2425
},
2526
"devDependencies": {

Tasks/UnityCreateProject/UnityCreateProjectV1/unity-create-project.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path = require('path');
22
import tl = require('azure-pipelines-task-lib/task');
3-
import { UnityPathTools, UnityToolRunner, Utilities } from '@dinomite-studios/unity-azure-pipelines-tasks-lib';
3+
import { UnityPathTools, UnitySceneTools, UnityToolRunner, Utilities } from '@dinomite-studios/unity-azure-pipelines-tasks-lib';
44

55
// Input variables
66
const versionInputVariableName = 'version';
@@ -53,6 +53,9 @@ async function run() {
5353

5454
// Unity process has finished. Set task result.
5555
if (result === 0) {
56+
// Once the empty project is created, we must add a new empty scene to it. Otherwise it will not build.
57+
UnitySceneTools.createSceneAt(path.join(projectPath, projectName), 'Assets/New Scene.unity', true);
58+
5659
const buildSuccessLog = tl.loc('successProjectCreated');
5760
console.log(buildSuccessLog);
5861
tl.setResult(tl.TaskResult.Succeeded, buildSuccessLog);

Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"main": "unity-get-project-version.js",
66
"scripts": {
77
"build": "tsc",
8-
"test": "nyc mocha test/_suite.js",
98
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
10+
"dev-refresh": "npm run dev-delete && npm run dev-upload",
1011
"dev-delete": "tfx build tasks delete --task-id 38ec98bf-601a-4390-9f2e-23d43dd6dbba",
1112
"dev-upload": "npm run build && npm run upload"
1213
},

Tasks/UnitySetup/UnitySetupV1/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build": "tsc",
88
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
910
"dev-refresh": "npm run dev-delete && npm run dev-upload",
1011
"dev-delete": "tfx build tasks delete --task-id de4be6e2-9c1e-4ae3-9a7e-6854f719bcc3",
1112
"dev-upload": "npm run build && npm run upload"

Tasks/UnitySetup/UnitySetupV2/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build": "tsc",
88
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
910
"dev-refresh": "npm run dev-delete && npm run dev-upload",
1011
"dev-delete": "tfx build tasks delete --task-id de4be6e2-9c1e-4ae3-9a7e-6854f719bcc3",
1112
"dev-upload": "npm run build && npm run upload"

Tasks/UnityTest/UnityTestV1/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"scripts": {
77
"build": "tsc",
88
"upload": "tfx build tasks upload --task-path ./",
9+
"test": "nyc mocha test/_suite.js",
10+
"dev-refresh": "npm run dev-delete && npm run dev-upload",
911
"dev-delete": "tfx build tasks delete --task-id 85e57e6f-cb59-4d1d-979f-dd830b51f2fa",
1012
"dev-upload": "npm run build && npm run upload"
1113
},

0 commit comments

Comments
 (0)