Skip to content

Commit d494017

Browse files
committed
fix: ensure Samples are included in the unitypackage
1 parent 1b6cfa8 commit d494017

File tree

60 files changed

+2348
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2348
-15
lines changed

.github/workflows/release-template.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,8 @@ jobs:
151151
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
152152
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
153153

154-
- name: 📂 List files after export
155-
run: |
156-
echo "Listing files after export"
157-
ls -R
158-
159154
- name: 🗂️ Upload Unity Package Artifact
160155
uses: actions/upload-artifact@v4
161156
with:
162157
name: com.mygamedevtools.scene-loader-${{ env.releaseVersion }}
163-
path: "./Assets/*.unitypackage"
158+
path: "./*.unitypackage"

Assets/Scripts/Editor/Editor.asmdef

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
"name": "Unity.InternalAPIEditorBridge.011",
2+
"name": "Editor",
33
"rootNamespace": "",
4-
"references": [],
4+
"references": [
5+
"GUID:1ef0bbeee4c5c164fadb7031fd63e223"
6+
],
57
"includePlatforms": [
68
"Editor"
79
],
+4-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
using System;
2-
using System.IO;
1+
using System.Linq;
2+
using Needle.HybridPackages;
33
using UnityEditor;
4-
using UnityEngine;
54

65
public static class PackageExporter
76
{
87
public static void ExportPackage()
98
{
109
string packageName = "com.mygamedevtools.scene-loader";
11-
string exportPath = Path.Combine(Application.dataPath, packageName + ".unitypackage");
12-
13-
AssetDatabase.ExportPackage("Packages/" + packageName, exportPath, ExportPackageOptions.Recurse);
14-
Console.WriteLine($"Exported package to: \"{exportPath}\"");
10+
string[] guids = AssetDatabase.GetAllAssetPaths().Where(p => p.StartsWith("Packages/" + packageName + "/")).Select(p => AssetDatabase.AssetPathToGUID(p)).ToArray();
11+
AssetStoreToolsPatchProvider.PackagerExportPatch.ExportPackage(guids, packageName + ".unitypackage");
1512
}
1613
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Changelog
2+
All notable changes to this package will be documented in this file.
3+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4+
5+
## [0.6.3] - 2023-08-22
6+
- catch patching exception
7+
- disable patching on Apple Silicon (unsupported)
8+
9+
## [0.6.2] - 2022-10-30
10+
- fixed compilation issue on 2020.x
11+
12+
## [0.6.1] - 2022-10-30
13+
- updated Readme
14+
15+
## [0.6.0] - 2022-10-30
16+
- added support for the new Asset Store tools and the integrated Hybrid Packages workflow
17+
- added automatically enabling the new flow in the Asset Store tools when this package is present
18+
- added button to open export folder from upload config
19+
- fix new AssetStore tools not allowing file:.. referenced packages for some reason
20+
- ensure namespace is Needle.HybridPackages everywhere
21+
22+
## [0.5.3] - 2021-05-25
23+
- added: default npmignore excludes will now be excluded when exporting hidden folders (Samples~, Documentation~ etc.)
24+
- added: new sample, Package with Samples
25+
- fixed: in very rare cases GUIDs can collide between assets. We're now properly avoiding these collisions.
26+
27+
## [0.5.2] - 2021-05-20
28+
- fixed: exporting a package that has samples but not using an upload config threw a nullref exception
29+
30+
## [0.5.1] - 2021-05-18
31+
- fixed: packing performance was low because compression strength was "Ultra", now defaults to "Normal"
32+
- changed: disabled gitignore/npmignore option by default (it's experimental), can be turned on in the upload config
33+
- added: ProgressBars to see what actually happens
34+
- added: ability to export one or many upload configs directly for local testing (without upload)
35+
36+
## [0.5.0] - 2021-05-18
37+
- added: ability to export hidden folders (Samples~, Documentation~ etc) in .unitypackage
38+
- added: file ignore checks for content from hidden folders based on .gitignore/.npmignore
39+
40+
## [0.4.0] - 2021-05-13
41+
- added: ability to create UploadConfigs that can specify multiple folders/packages for store upload
42+
- added: prevent packages that start with "com.unity." from being uploaded
43+
- added: prevent packages in the Library from being uploaded (only local/embedded packages should be)
44+
- added: sample UploadConfig, import via PackMan samples.
45+
46+
## [0.3.0] - 2021-05-03
47+
- embedded Harmony plugin to simplify dependencies
48+
- fixed: DLLs were not exported in some cases because Unity treats them as DefaultAssets, same as folders
49+
50+
## [0.2.0] - 2021-04-28
51+
- initial OpenUPM release
52+
- Readme adjustments
53+
54+
## [0.1.0-exp] - 2021-04-10
55+
- initial package version
56+
- supports `Asset Store Tools 5.0`
57+
- supports `Assets/Export Package`
58+
- tested against Unity 2018.4, 2019.4, 2020.3

Packages/com.needle.upm-in-unitypackage/Changelog.md.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Packages/com.needle.upm-in-unitypackage/Editor.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)