Skip to content

Commit f7fe38f

Browse files
committed
fix: export unity package to assets folder
1 parent c1cd3dd commit f7fe38f

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/release-template.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
git subtree split -P "$PACKAGE_PATH" -b upm
9191
git checkout upm
9292
if [[ -d "Samples" ]]; then
93-
mv Samples Samples~
93+
git mv Samples Samples~
9494
rm -f Samples.meta
9595
git commit --amend -a --no-edit
9696
fi
@@ -165,4 +165,4 @@ jobs:
165165
uses: actions/upload-artifact@v4
166166
with:
167167
name: com.mygamedevtools.scene-loader-${{ env.releaseVersion }}
168-
path: "./*.unitypackage"
168+
path: "./Assets/*.unitypackage"

Assets/Scripts/Editor/PackageExporter.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.IO;
23
using UnityEditor;
34
using UnityEngine;
45

@@ -13,7 +14,7 @@ public static void ExportPackage()
1314
string[] collection = Array.Empty<string>();
1415
collection = AssetDatabase.CollectAllChildren(rootGuid, collection);
1516

16-
PackageUtility.ExportPackage(collection, packageName + ".unitypackage");
17-
Console.WriteLine($"Exported package to: \"{Application.dataPath}/../{packageName}.unitypackage\"");
17+
PackageUtility.ExportPackage(collection, Path.Combine(Application.dataPath, packageName + ".unitypackage"));
18+
Console.WriteLine($"Exported package to: \"{Application.dataPath}/{packageName}.unitypackage\"");
1819
}
1920
}

Packages/com.mygamedevtools.scene-loader/Samples/LoadingSceneExamples/Scripts/Editor/Sample.LoadingScene.Editor.asmdef

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"GUID:78bd2ddd6e276394a9615c203e574844",
99
"GUID:457756d89b35d2941b3e7b37b4ece6f1"
1010
],
11-
"includePlatforms": [],
11+
"includePlatforms": [
12+
"Editor"
13+
],
1214
"excludePlatforms": [],
1315
"allowUnsafeCode": false,
1416
"overrideReferences": false,

0 commit comments

Comments
 (0)