@@ -11,13 +11,11 @@ Set-Location (Split-Path $MyInvocation.MyCommand.Path)
11
11
$solutionDir = Get-SolutionDirectory
12
12
Set-Location $solutionDir
13
13
14
- $packageName = " FixedMathSharp.$env: GitVersion_FullSemVer .unitypackage"
15
- $packagePath = " $solutionDir \$OutputPath \$packageName "
16
-
17
14
$fixedMathSharpPluginsPath = " $solutionDir \src\FixedMathSharp.Editor\bin\Release\net48"
18
15
$unityProjectPath = " $solutionDir \FMS_UnityProject"
19
16
$unityAssetsPath = " $unityProjectPath \Assets\FixedMathSharp"
20
17
$unityPluginsPath = " $unityAssetsPath \Plugins"
18
+ $packagePath = " $solutionDir \$OutputPath "
21
19
22
20
# Ensure a fresh Unity project by deleting the directory if it exists
23
21
if (Test-Path $unityProjectPath ) {
@@ -42,15 +40,16 @@ Copy-Item "$fixedMathSharpPluginsPath\*" $unityPluginsPath -Recurse -ErrorAction
42
40
# Copy Unity editor-specific scripts to the Assets folder
43
41
Copy-Item " $solutionDir \src\FixedMathSharp.Editor\Editor" $unityAssetsPath - Recurse - ErrorAction SilentlyContinue
44
42
43
+ $packageName = " FixedMathSharp.$env: GitVersion_FullSemVer .unitypackage"
45
44
$unityExePath = " C:\Program Files\Unity\Hub\Editor\$env: UnityVersion \Editor\Unity.exe"
46
45
$unityArgs = @ (
47
46
" -quit" , # Quit after the operation completes
48
47
" -batchmode" , # Run in batch mode (no UI)
49
48
" -projectPath" , " $unityProjectPath " , # Path to the Unity project
50
- " -exportPackage" , " Assets" , " $packagePath "
49
+ " -exportPackage" , " Assets" , " $packagePath \ $packageName "
51
50
)
52
51
53
- Write-Host " Packing to $packagePath ..."
52
+ Write-Host " Packing to $packagePath \ $packageName ..."
54
53
55
54
# Run Unity to create the package
56
55
Start-Process $unityExePath - ArgumentList $unityArgs - Wait - NoNewWindow
0 commit comments