From 89a05951f4d23cab74634d49ac546db0f7a62e4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9C=E8=99=9E=E6=B8=A0=E6=88=90=E2=80=9D?=
<“yuqucheng2006@qq.com”>
Date: Thu, 20 Aug 2026 09:05:50 +0800
Subject: [PATCH] =?UTF-8?q?build:=20=E9=85=8D=E7=BD=AE=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=88=86=E6=9E=90=E6=8A=91=E5=88=B6=E4=B8=8E?=
=?UTF-8?q?=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 添加全局代码抑制文件,修复Unity消息方法的静态分析误报
2. 新增Directory.Build.props配置,禁用构建时代码风格强制检查
3. 更新packages配置,添加Antigravity IDE包并升级Visual Scripting版本
4. 优化VSCode调试配置与开发环境设置
5. 添加EditorConfig统一代码格式规则
---
.editorconfig | 35 +++++++++++++++++++++++++++++++
.vscode/launch.json | 17 +++++++++++----
.vscode/settings.json | 13 ++++++++++--
Assets/GlobalSuppressions.cs | 11 ++++++++++
Assets/GlobalSuppressions.cs.meta | 11 ++++++++++
Directory.Build.props | 8 +++++++
Packages/manifest.json | 5 +++--
Packages/packages-lock.json | 9 +++++++-
8 files changed, 100 insertions(+), 9 deletions(-)
create mode 100644 .editorconfig
create mode 100644 Assets/GlobalSuppressions.cs
create mode 100644 Assets/GlobalSuppressions.cs.meta
create mode 100644 Directory.Build.props
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..bd53446
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,35 @@
+# Antigravity IDE — Unity Analyzer Configuration
+# Auto-generated. Safe to customize.
+
+root = true
+
+[*.cs]
+
+# Formatting
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+# Unity-specific diagnostic suppressions
+# IDE0051: Remove unused private members — false positive for Unity messages
+dotnet_diagnostic.IDE0051.severity = none
+
+# IDE0044: Add readonly modifier — false positive for serialized fields
+dotnet_diagnostic.IDE0044.severity = none
+
+# CS0649: Field is never assigned — false positive for [SerializeField]
+dotnet_diagnostic.CS0649.severity = none
+
+[*.shader]
+indent_style = tab
+
+[*.uss]
+indent_style = space
+indent_size = 4
+
+[*.uxml]
+indent_style = space
+indent_size = 4
diff --git a/.vscode/launch.json b/.vscode/launch.json
index da60e25..214c5c8 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -2,9 +2,18 @@
"version": "0.2.0",
"configurations": [
{
- "name": "Attach to Unity",
- "type": "vstuc",
- "request": "attach"
+ "name": "Attach to Unity Editor",
+ "type": "unity",
+ "request": "attach",
+ "path": "${workspaceFolder}/Library/EditorInstance.json"
+ },
+ {
+ "name": "Attach to Unity Player",
+ "type": "unity",
+ "request": "attach",
+ "transportArgs": {
+ "port": 56000
+ }
}
- ]
+ ]
}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index d56c977..eb9078f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,4 +1,14 @@
{
+ "dotnet.defaultSolution": "Kill.sln",
+ "dotnet.dotnetPath": "C:/Program Files/dotnet/dotnet.exe",
+ "dotrush.roslyn.dotnetSdkDirectory": "C:/Program Files/dotnet/sdk/8.0.113",
+ "dotrush.msbuildProperties": {
+ "DefineConstants": "UNITY_EDITOR"
+ },
+ "dotrush.roslyn.projectOrSolutionFiles": [
+ "D:/unity_project/Kill/Kill.sln"
+ ],
+ "dotrush.roslyn.restoreProjectsBeforeLoading": false,
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
@@ -50,6 +60,5 @@
"ProjectSettings/": true,
"temp/": true,
"Temp/": true
- },
- "dotnet.defaultSolution": "Kill.sln"
+ }
}
\ No newline at end of file
diff --git a/Assets/GlobalSuppressions.cs b/Assets/GlobalSuppressions.cs
new file mode 100644
index 0000000..5f20c8e
--- /dev/null
+++ b/Assets/GlobalSuppressions.cs
@@ -0,0 +1,11 @@
+//
+// Antigravity IDE — Unity analyzer suppressions
+// This file suppresses false-positive diagnostics for Unity API messages.
+// Safe to delete if not using Roslyn analyzers.
+//
+
+using System.Diagnostics.CodeAnalysis;
+
+// Suppress warnings for Unity message methods that appear unused to static analysis
+[assembly: SuppressMessage("CodeQuality", "IDE0051:Remove unused private members",
+ Justification = "Unity message methods are called by the engine via reflection")]
diff --git a/Assets/GlobalSuppressions.cs.meta b/Assets/GlobalSuppressions.cs.meta
new file mode 100644
index 0000000..0150cdd
--- /dev/null
+++ b/Assets/GlobalSuppressions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b967e518f5ade0943abbc49708eeadc9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..9695c5f
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,8 @@
+
+
+ false
+
+
+
+
+
diff --git a/Packages/manifest.json b/Packages/manifest.json
index f57ca21..c13f751 100644
--- a/Packages/manifest.json
+++ b/Packages/manifest.json
@@ -8,7 +8,7 @@
"com.unity.test-framework": "1.1.33",
"com.unity.timeline": "1.7.7",
"com.unity.ugui": "1.0.0",
- "com.unity.visualscripting": "1.9.4",
+ "com.unity.visualscripting": "1.9.11",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
@@ -39,6 +39,7 @@
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
- "com.unity.modules.xr": "1.0.0"
+ "com.unity.modules.xr": "1.0.0",
+ "com.antigravity.ide": "https://github.com/billythekidz/UnityAntigravityIDE.git"
}
}
diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json
index 6b0b4e9..0c3b9ff 100644
--- a/Packages/packages-lock.json
+++ b/Packages/packages-lock.json
@@ -1,5 +1,12 @@
{
"dependencies": {
+ "com.antigravity.ide": {
+ "version": "https://github.com/billythekidz/UnityAntigravityIDE.git",
+ "depth": 0,
+ "source": "git",
+ "dependencies": {},
+ "hash": "3520075082911bf236ade261e544078a3f9bed65"
+ },
"com.unity.2d.sprite": {
"version": "1.0.0",
"depth": 0,
@@ -76,7 +83,7 @@
}
},
"com.unity.visualscripting": {
- "version": "1.9.4",
+ "version": "1.9.11",
"depth": 0,
"source": "registry",
"dependencies": {