@@ -11,13 +11,11 @@ Set-Location (Split-Path $MyInvocation.MyCommand.Path)
1111$solutionDir = Get-SolutionDirectory
1212Set-Location $solutionDir
1313
14- $packageName = " FixedMathSharp.$env: GitVersion_FullSemVer .unitypackage"
15- $packagePath = " $solutionDir \$OutputPath \$packageName "
16-
1714$fixedMathSharpPluginsPath = " $solutionDir \src\FixedMathSharp.Editor\bin\Release\net48"
1815$unityProjectPath = " $solutionDir \FMS_UnityProject"
1916$unityAssetsPath = " $unityProjectPath \Assets\FixedMathSharp"
2017$unityPluginsPath = " $unityAssetsPath \Plugins"
18+ $packagePath = " $solutionDir \$OutputPath "
2119
2220# Ensure a fresh Unity project by deleting the directory if it exists
2321if (Test-Path $unityProjectPath ) {
@@ -42,15 +40,16 @@ Copy-Item "$fixedMathSharpPluginsPath\*" $unityPluginsPath -Recurse -ErrorAction
4240# Copy Unity editor-specific scripts to the Assets folder
4341Copy-Item " $solutionDir \src\FixedMathSharp.Editor\Editor" $unityAssetsPath - Recurse - ErrorAction SilentlyContinue
4442
43+ $packageName = " FixedMathSharp.$env: GitVersion_FullSemVer .unitypackage"
4544$unityExePath = " C:\Program Files\Unity\Hub\Editor\$env: UnityVersion \Editor\Unity.exe"
4645$unityArgs = @ (
4746 " -quit" , # Quit after the operation completes
4847 " -batchmode" , # Run in batch mode (no UI)
4948 " -projectPath" , " $unityProjectPath " , # Path to the Unity project
50- " -exportPackage" , " Assets" , " $packagePath "
49+ " -exportPackage" , " Assets" , " $packagePath \ $packageName "
5150)
5251
53- Write-Host " Packing to $packagePath ..."
52+ Write-Host " Packing to $packagePath \ $packageName ..."
5453
5554# Run Unity to create the package
5655Start-Process $unityExePath - ArgumentList $unityArgs - Wait - NoNewWindow
0 commit comments