Skip to content

Commit cfed4e0

Browse files
add log file
1 parent db128f7 commit cfed4e0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dist/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61396,20 +61396,21 @@ async function main() {
6139661396
}
6139761397
const unityEditor = new unity_cli_1.UnityEditor(process.env.UNITY_EDITOR_PATH);
6139861398
core.debug(`Using Unity Editor at path:\n > ${unityEditor.editorPath}`);
61399-
const templateNameInput = core.getInput('template-name');
61400-
const templatePath = unityEditor.GetTemplatePath(templateNameInput);
61399+
const templatePath = unityEditor.GetTemplatePath(core.getInput('template-name'));
6140161400
core.debug(`Using Unity template at path:\n > ${templatePath}`);
6140261401
const projectNameInput = core.getInput('project-name', { required: true });
6140361402
const projectDirectoryInput = core.getInput('project-directory') || process.cwd();
6140461403
const projectPath = `${projectDirectoryInput}/${projectNameInput}`;
6140561404
core.debug(`Creating Unity project at:\n > ${projectPath}`);
61405+
const logPath = unityEditor.GenerateLogFilePath(projectPath, 'create-unity-project');
6140661406
await unityEditor.Run({
6140761407
args: [
6140861408
'-quit',
6140961409
'-nographics',
6141061410
'-batchmode',
6141161411
'-createProject', projectPath,
6141261412
'-cloneFromTemplate', templatePath,
61413+
'-logFile', logPath
6141361414
]
6141461415
});
6141561416
core.setOutput('project-path', projectPath);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,21 @@ async function main() {
99

1010
const unityEditor = new UnityEditor(process.env.UNITY_EDITOR_PATH);
1111
core.debug(`Using Unity Editor at path:\n > ${unityEditor.editorPath}`);
12-
13-
const templateNameInput = core.getInput('template-name');
14-
const templatePath = unityEditor.GetTemplatePath(templateNameInput);
12+
const templatePath = unityEditor.GetTemplatePath(core.getInput('template-name'));
1513
core.debug(`Using Unity template at path:\n > ${templatePath}`);
16-
1714
const projectNameInput = core.getInput('project-name', { required: true });
1815
const projectDirectoryInput = core.getInput('project-directory') || process.cwd();
1916
const projectPath = `${projectDirectoryInput}/${projectNameInput}`;
2017
core.debug(`Creating Unity project at:\n > ${projectPath}`);
18+
const logPath = unityEditor.GenerateLogFilePath(projectPath, 'create-unity-project');
2119
await unityEditor.Run({
2220
args: [
2321
'-quit',
2422
'-nographics',
2523
'-batchmode',
2624
'-createProject', projectPath,
2725
'-cloneFromTemplate', templatePath,
26+
'-logFile', logPath
2827
]
2928
});
3029
core.setOutput('project-path', projectPath);

0 commit comments

Comments
 (0)