chore: initialize standalone UPM package
Publish UPM package / publish (push) Failing after 1s

This commit is contained in:
2026-08-26 02:48:49 +08:00
commit ee385a4107
32 changed files with 897 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
{
"name": "ShrinkApp.Core.Editor",
"rootNamespace": "ShrinkApp.Editor",
"references": [
"ShrinkApp.Core.Runtime"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d16f21ff20129e14283877a81cca3054
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+39
View File
@@ -0,0 +1,39 @@
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
namespace ShrinkApp.Editor
{
public static class ShrinkAppEditorMenu
{
[MenuItem("ShrinkApp/创建 Settings")]
public static void CreateSettingsAsset()
{
const string resourcesDir = "Assets/Resources";
if (!AssetDatabase.IsValidFolder(resourcesDir))
AssetDatabase.CreateFolder("Assets", "Resources");
const string assetPath = "Assets/Resources/ShrinkAppSettings.asset";
var existing = AssetDatabase.LoadAssetAtPath<ShrinkAppSettings>(assetPath);
if (existing != null)
{
Selection.activeObject = existing;
EditorGUIUtility.PingObject(existing);
return;
}
// 旧版本曾生成过 m_Script=fileID:0 的无效占位资产。删除该占位后
// 才能在同一路径创建真正绑定 ShrinkAppSettings 类型的资产。
if (!string.IsNullOrEmpty(AssetDatabase.AssetPathToGUID(assetPath)))
AssetDatabase.DeleteAsset(assetPath);
var asset = ScriptableObject.CreateInstance<ShrinkAppSettings>();
AssetDatabase.CreateAsset(asset, assetPath);
AssetDatabase.SaveAssets();
Selection.activeObject = asset;
EditorGUIUtility.PingObject(asset);
Debug.Log("[ShrinkApp] 已创建 ShrinkAppSettings.asset");
}
}
}
#endif
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 30f867e31a8e02e41b25f1ef5b4dddec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: