diff --git a/CharacterPreview/CharacterPreview.csproj b/CharacterPreview/CharacterPreview.csproj
new file mode 100644
index 0000000..39e50cc
--- /dev/null
+++ b/CharacterPreview/CharacterPreview.csproj
@@ -0,0 +1,32 @@
+
+
+
+ netstandard2.1
+ enable
+ D:\steam\steamapps\common\Escape from Duckov
+ false
+
+
+
+ D:\steam\steamapps\common\Escape from Duckov\Duckov_Data\Mods\CharacterPreview
+ false
+ none
+
+
+ D:\steam\steamapps\common\Escape from Duckov\Duckov_Data\Mods\CharacterPreview
+ false
+ none
+
+
+
+
+
+
+
+ ..\..\..\steam\steamapps\common\Escape from Duckov\Duckov_Data\Managed\Eflatun.SceneReference.dll
+
+
+
+
+
+
diff --git a/CharacterPreview/ModBehaviour.cs b/CharacterPreview/ModBehaviour.cs
new file mode 100644
index 0000000..1afab38
--- /dev/null
+++ b/CharacterPreview/ModBehaviour.cs
@@ -0,0 +1,134 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using Duckov.Utilities;
+using Saves;
+using UnityEngine;
+using UnityEngine.SceneManagement;
+using Object = UnityEngine.Object;
+
+namespace CharacterPreview
+{
+ public class ModBehaviour : Duckov.Modding.ModBehaviour
+ {
+ private static CharacterModel characterModel;
+ private const string characterFaceSaveKey = "CustomFace_MainCharacter";
+ private OnPointerClick? instance;
+
+ private const string ModelName = "CharacterPreviewModel";
+
+ protected override void OnAfterSetup()
+ {
+ MainMenu.OnMainMenuAwake += CreateCharacterModel;
+ //
+ // if (!instance)
+ // {
+ // instance = GetPointerClickEventReceiver();
+ // if (instance == null)
+ // {
+ // Debug.LogError("未能找到 SceneLoader.Instance.pointerClickEventRecevier!");
+ // }
+ // else
+ // {
+ // instance.onPointerClick.AddListener((t) => CreateCharacterModel());
+ // }
+ //
+ // }
+ }
+
+ protected override void OnBeforeDeactivate()
+ {
+ MainMenu.OnMainMenuAwake -= CreateCharacterModel;
+
+ if (characterModel)
+ {
+ Destroy(characterModel.gameObject);
+ }
+ }
+
+ public static void CreateCharacterModel()
+ {
+ if (characterModel)
+ {
+ Debug.LogWarning("CharacterModel is already created");
+ return;
+ }
+
+ if (SceneManager.GetActiveScene().name != "MainMenu")
+ {
+ Debug.LogWarning("非主菜单");
+ return;
+ }
+ if (!characterModel)
+ {
+ var prefab = GetCharacterModelPrefab_Reflection();
+ if (prefab == null)
+ {
+ Debug.LogError("未能获取 CharacterModel 预制体!");
+ return;
+ }
+ characterModel = Instantiate(prefab);
+ }
+
+ if (characterModel)
+ {
+ characterModel.name = ModelName;
+ var customFaceSettingData = SavesSystem.Load(characterFaceSaveKey);
+ if (!customFaceSettingData.savedSetting)
+ {
+ Debug.LogError("未能找到或加载 CustomFaceSettingData !");
+ customFaceSettingData = GameplayDataSettings.CustomFaceData.DefaultPreset.settings;
+ }
+ characterModel.CustomFace.LoadFromData(customFaceSettingData);
+ characterModel.gameObject.AddComponent();
+ }
+ }
+
+ OnPointerClick GetPointerClickEventReceiver()
+ {
+ var sl = SceneLoader.Instance;
+ // 使用反射获取 SceneLoader 中的 pointerClickEventReceiver 字段
+ var field = typeof(SceneLoader).GetField("pointerClickEventRecevier", BindingFlags.Instance | BindingFlags.NonPublic);
+ if (field == null)
+ {
+ Debug.LogError("pointerClickEventRecevier 字段在 SceneLoader 中未找到!");
+ return null;
+ }
+ // 获取字段值并转换为 OnPointerClick
+ var eventReceiver = field.GetValue(sl) as OnPointerClick;
+ if (eventReceiver == null)
+ {
+ Debug.LogError("pointerClickEventRecevier 字段的值为空!");
+ return null;
+ }
+ return eventReceiver;
+ }
+ private static CharacterModel GetCharacterModelPrefab_Reflection()
+ {
+ // 获取 LevelManager 实例
+ var lm = GameplayDataSettings.Prefabs.LevelManagerPrefab;
+ if (lm == null)
+ {
+ Debug.LogError("LevelManager 实例未找到!");
+ return null;
+ }
+
+ // 使用反射获取 LevelManager 中的 characterModel 字段
+ var field = typeof(LevelManager).GetField("characterModel", BindingFlags.Instance | BindingFlags.NonPublic);
+ if (field == null)
+ {
+ Debug.LogError("characterModel 字段在 LevelManager 中未找到!");
+ return null;
+ }
+
+ // 获取字段值并转换为 CharacterModel
+ var modelPrefab = field.GetValue(lm) as CharacterModel;
+ if (modelPrefab == null)
+ {
+ Debug.LogError("characterModel 字段的值为空!");
+ return null;
+ }
+ return modelPrefab;
+ }
+ }
+}
diff --git a/CharacterPreview/ModelMove.cs b/CharacterPreview/ModelMove.cs
new file mode 100644
index 0000000..1763e7d
--- /dev/null
+++ b/CharacterPreview/ModelMove.cs
@@ -0,0 +1,53 @@
+using System;
+using UnityEngine;
+
+namespace CharacterPreview
+{
+ public class ModelMove:MonoBehaviour
+ {
+ private Camera _camera;
+ public Camera currentCamera
+ {
+ get
+ {
+ if (!_camera)
+ {
+ _camera = Camera.main;
+ if (!_camera)
+ {
+ _camera = FindObjectOfType();
+ }
+ }
+ return _camera;
+ }
+ }
+ private void Start()
+ {
+ if (currentCamera)
+ {
+ var worldPos = CameraLocalToWorld(currentCamera, new Vector3(1, -1, 1));
+ transform.position = worldPos;
+ }
+ else
+ {
+ transform.position = new Vector3(8, 8, -16);
+ }
+ }
+ ///
+ /// 将摄像机局部坐标系中的点转换为世界坐标系中的点。
+ /// 假设摄像机局部坐标系:前向为 +Z,右为 +X,上为 +Y。
+ ///
+ /// 目标摄像机
+ /// 在摄像机局部坐标系中的点
+ /// 对应的世界坐标
+ public static Vector3 CameraLocalToWorld(Camera camera, Vector3 localPoint)
+ {
+ if (camera == null)
+ throw new System.ArgumentNullException(nameof(camera));
+
+ Transform camTransform = camera.transform;
+ // 旋转局部点到世界方向,然后加上摄像机位置
+ return camTransform.position + camTransform.rotation * localPoint;
+ }
+ }
+}
\ No newline at end of file
diff --git a/CharacterPreview/PatchSceneLoaderNotifyPointerClick.cs b/CharacterPreview/PatchSceneLoaderNotifyPointerClick.cs
new file mode 100644
index 0000000..940c2d9
--- /dev/null
+++ b/CharacterPreview/PatchSceneLoaderNotifyPointerClick.cs
@@ -0,0 +1,13 @@
+// using HarmonyLib;
+//
+// namespace CharacterPreview
+// {
+// [HarmonyPatch(typeof(SceneLoader), "NotifyPointerClick")]
+// public class PatchSceneLoaderNotifyPointerClick
+// {
+// public static void Postfix(SceneLoader __instance)
+// {
+// ModBehaviour.CreateCharacterModel();
+// }
+// }
+// }
\ No newline at end of file
diff --git a/CharacterPreview/obj/CharacterPreview.csproj.nuget.dgspec.json b/CharacterPreview/obj/CharacterPreview.csproj.nuget.dgspec.json
new file mode 100644
index 0000000..6ce5711
--- /dev/null
+++ b/CharacterPreview/obj/CharacterPreview.csproj.nuget.dgspec.json
@@ -0,0 +1,79 @@
+{
+ "format": 1,
+ "restore": {
+ "D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj": {}
+ },
+ "projects": {
+ "D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj",
+ "projectName": "CharacterPreview",
+ "projectPath": "D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj",
+ "packagesPath": "C:\\Users\\Lenovo\\.nuget\\packages\\",
+ "outputPath": "D:\\vs_project\\DuckovMods\\CharacterPreview\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "D:\\vsShare\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Lenovo\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netstandard2.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netstandard2.1": {
+ "targetAlias": "netstandard2.1",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ },
+ "SdkAnalysisLevel": "9.0.300"
+ },
+ "frameworks": {
+ "netstandard2.1": {
+ "targetAlias": "netstandard2.1",
+ "dependencies": {
+ "Lib.Harmony": {
+ "target": "Package",
+ "version": "[2.4.1, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "NETStandard.Library": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.306\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/CharacterPreview/obj/CharacterPreview.csproj.nuget.g.props b/CharacterPreview/obj/CharacterPreview.csproj.nuget.g.props
new file mode 100644
index 0000000..2e378fe
--- /dev/null
+++ b/CharacterPreview/obj/CharacterPreview.csproj.nuget.g.props
@@ -0,0 +1,16 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\Lenovo\.nuget\packages\;D:\vsShare\NuGetPackages
+ PackageReference
+ 6.14.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CharacterPreview/obj/CharacterPreview.csproj.nuget.g.targets b/CharacterPreview/obj/CharacterPreview.csproj.nuget.g.targets
new file mode 100644
index 0000000..3dc06ef
--- /dev/null
+++ b/CharacterPreview/obj/CharacterPreview.csproj.nuget.g.targets
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/CharacterPreview/obj/Debug/.NETStandard,Version=v2.1.AssemblyAttributes.cs b/CharacterPreview/obj/Debug/.NETStandard,Version=v2.1.AssemblyAttributes.cs
new file mode 100644
index 0000000..348b87f
--- /dev/null
+++ b/CharacterPreview/obj/Debug/.NETStandard,Version=v2.1.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
diff --git a/CharacterPreview/obj/Debug/Characte.69A9E5B8.Up2Date b/CharacterPreview/obj/Debug/Characte.69A9E5B8.Up2Date
new file mode 100644
index 0000000..e69de29
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.AssemblyInfo.cs b/CharacterPreview/obj/Debug/CharacterPreview.AssemblyInfo.cs
new file mode 100644
index 0000000..1cb0887
--- /dev/null
+++ b/CharacterPreview/obj/Debug/CharacterPreview.AssemblyInfo.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
+[assembly: System.Reflection.AssemblyProductAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyTitleAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// 由 MSBuild WriteCodeFragment 类生成。
+
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.AssemblyInfoInputs.cache b/CharacterPreview/obj/Debug/CharacterPreview.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..5277c29
--- /dev/null
+++ b/CharacterPreview/obj/Debug/CharacterPreview.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+3bcd831ea4f29882c4ad0e74553f21cd67857c5ac8ecf673bf0a5c0e6b28519c
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig b/CharacterPreview/obj/Debug/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 0000000..0e94d46
--- /dev/null
+++ b/CharacterPreview/obj/Debug/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,8 @@
+is_global = true
+build_property.RootNamespace = CharacterPreview
+build_property.ProjectDir = D:\vs_project\DuckovMods\CharacterPreview\
+build_property.EnableComHosting =
+build_property.EnableGeneratedComInterfaceComImportInterop =
+build_property.CsWinRTUseWindowsUIXamlProjections = false
+build_property.EffectiveAnalysisLevelStyle =
+build_property.EnableCodeStyleSeverity =
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.assets.cache b/CharacterPreview/obj/Debug/CharacterPreview.assets.cache
new file mode 100644
index 0000000..dc2b8bc
Binary files /dev/null and b/CharacterPreview/obj/Debug/CharacterPreview.assets.cache differ
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.csproj.AssemblyReference.cache b/CharacterPreview/obj/Debug/CharacterPreview.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..00be8a7
Binary files /dev/null and b/CharacterPreview/obj/Debug/CharacterPreview.csproj.AssemblyReference.cache differ
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.csproj.CoreCompileInputs.cache b/CharacterPreview/obj/Debug/CharacterPreview.csproj.CoreCompileInputs.cache
new file mode 100644
index 0000000..cebde03
--- /dev/null
+++ b/CharacterPreview/obj/Debug/CharacterPreview.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+c29902ba5d072858998bd0700a0022b61d2b982553e1d41c36961a930ba99211
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.csproj.FileListAbsolute.txt b/CharacterPreview/obj/Debug/CharacterPreview.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..71c9663
--- /dev/null
+++ b/CharacterPreview/obj/Debug/CharacterPreview.csproj.FileListAbsolute.txt
@@ -0,0 +1,8 @@
+D:\steam\steamapps\common\Escape from Duckov\Duckov_Data\Mods\CharacterPreview\CharacterPreview.dll
+D:\vs_project\DuckovMods\CharacterPreview\obj\Debug\CharacterPreview.csproj.AssemblyReference.cache
+D:\vs_project\DuckovMods\CharacterPreview\obj\Debug\CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
+D:\vs_project\DuckovMods\CharacterPreview\obj\Debug\CharacterPreview.AssemblyInfoInputs.cache
+D:\vs_project\DuckovMods\CharacterPreview\obj\Debug\CharacterPreview.AssemblyInfo.cs
+D:\vs_project\DuckovMods\CharacterPreview\obj\Debug\CharacterPreview.csproj.CoreCompileInputs.cache
+D:\vs_project\DuckovMods\CharacterPreview\obj\Debug\CharacterPreview.dll
+D:\vs_project\DuckovMods\CharacterPreview\obj\Debug\Characte.69A9E5B8.Up2Date
diff --git a/CharacterPreview/obj/Debug/CharacterPreview.dll b/CharacterPreview/obj/Debug/CharacterPreview.dll
new file mode 100644
index 0000000..2124ffc
Binary files /dev/null and b/CharacterPreview/obj/Debug/CharacterPreview.dll differ
diff --git a/CharacterPreview/obj/Release/.NETStandard,Version=v2.1.AssemblyAttributes.cs b/CharacterPreview/obj/Release/.NETStandard,Version=v2.1.AssemblyAttributes.cs
new file mode 100644
index 0000000..348b87f
--- /dev/null
+++ b/CharacterPreview/obj/Release/.NETStandard,Version=v2.1.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
diff --git a/CharacterPreview/obj/Release/CharacterPreview.AssemblyInfo.cs b/CharacterPreview/obj/Release/CharacterPreview.AssemblyInfo.cs
new file mode 100644
index 0000000..87ea779
--- /dev/null
+++ b/CharacterPreview/obj/Release/CharacterPreview.AssemblyInfo.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
+[assembly: System.Reflection.AssemblyProductAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyTitleAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// 由 MSBuild WriteCodeFragment 类生成。
+
diff --git a/CharacterPreview/obj/Release/CharacterPreview.AssemblyInfoInputs.cache b/CharacterPreview/obj/Release/CharacterPreview.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..c0e0e81
--- /dev/null
+++ b/CharacterPreview/obj/Release/CharacterPreview.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+cdbee0654e5bd2c9896d77407e3d7ce5ae6183e3f37c36106e534970cbdd063c
diff --git a/CharacterPreview/obj/Release/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig b/CharacterPreview/obj/Release/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 0000000..0e94d46
--- /dev/null
+++ b/CharacterPreview/obj/Release/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,8 @@
+is_global = true
+build_property.RootNamespace = CharacterPreview
+build_property.ProjectDir = D:\vs_project\DuckovMods\CharacterPreview\
+build_property.EnableComHosting =
+build_property.EnableGeneratedComInterfaceComImportInterop =
+build_property.CsWinRTUseWindowsUIXamlProjections = false
+build_property.EffectiveAnalysisLevelStyle =
+build_property.EnableCodeStyleSeverity =
diff --git a/CharacterPreview/obj/Release/CharacterPreview.assets.cache b/CharacterPreview/obj/Release/CharacterPreview.assets.cache
new file mode 100644
index 0000000..c5fc3aa
Binary files /dev/null and b/CharacterPreview/obj/Release/CharacterPreview.assets.cache differ
diff --git a/CharacterPreview/obj/Release/CharacterPreview.csproj.AssemblyReference.cache b/CharacterPreview/obj/Release/CharacterPreview.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..00be8a7
Binary files /dev/null and b/CharacterPreview/obj/Release/CharacterPreview.csproj.AssemblyReference.cache differ
diff --git a/CharacterPreview/obj/Release/CharacterPreview.csproj.CoreCompileInputs.cache b/CharacterPreview/obj/Release/CharacterPreview.csproj.CoreCompileInputs.cache
new file mode 100644
index 0000000..67d3d27
--- /dev/null
+++ b/CharacterPreview/obj/Release/CharacterPreview.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+356db5ad935a1120367a47fbf381e8f0de76f293776515bb91fa0b0cadad25c7
diff --git a/CharacterPreview/obj/Release/CharacterPreview.csproj.FileListAbsolute.txt b/CharacterPreview/obj/Release/CharacterPreview.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..5f793ff
--- /dev/null
+++ b/CharacterPreview/obj/Release/CharacterPreview.csproj.FileListAbsolute.txt
@@ -0,0 +1,7 @@
+D:\steam\steamapps\common\Escape from Duckov\Duckov_Data\Mods\CharacterPreview\CharacterPreview.dll
+D:\vs_project\DuckovMods\CharacterPreview\obj\Release\CharacterPreview.csproj.AssemblyReference.cache
+D:\vs_project\DuckovMods\CharacterPreview\obj\Release\CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
+D:\vs_project\DuckovMods\CharacterPreview\obj\Release\CharacterPreview.AssemblyInfoInputs.cache
+D:\vs_project\DuckovMods\CharacterPreview\obj\Release\CharacterPreview.AssemblyInfo.cs
+D:\vs_project\DuckovMods\CharacterPreview\obj\Release\CharacterPreview.csproj.CoreCompileInputs.cache
+D:\vs_project\DuckovMods\CharacterPreview\obj\Release\CharacterPreview.dll
diff --git a/CharacterPreview/obj/Release/CharacterPreview.dll b/CharacterPreview/obj/Release/CharacterPreview.dll
new file mode 100644
index 0000000..7201cbf
Binary files /dev/null and b/CharacterPreview/obj/Release/CharacterPreview.dll differ
diff --git a/CharacterPreview/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs b/CharacterPreview/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs
new file mode 100644
index 0000000..348b87f
--- /dev/null
+++ b/CharacterPreview/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
diff --git a/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.AssemblyInfo.cs b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.AssemblyInfo.cs
new file mode 100644
index 0000000..87ea779
--- /dev/null
+++ b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.AssemblyInfo.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
+[assembly: System.Reflection.AssemblyProductAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyTitleAttribute("CharacterPreview")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// 由 MSBuild WriteCodeFragment 类生成。
+
diff --git a/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.AssemblyInfoInputs.cache b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..c0e0e81
--- /dev/null
+++ b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+cdbee0654e5bd2c9896d77407e3d7ce5ae6183e3f37c36106e534970cbdd063c
diff --git a/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 0000000..0e94d46
--- /dev/null
+++ b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,8 @@
+is_global = true
+build_property.RootNamespace = CharacterPreview
+build_property.ProjectDir = D:\vs_project\DuckovMods\CharacterPreview\
+build_property.EnableComHosting =
+build_property.EnableGeneratedComInterfaceComImportInterop =
+build_property.CsWinRTUseWindowsUIXamlProjections = false
+build_property.EffectiveAnalysisLevelStyle =
+build_property.EnableCodeStyleSeverity =
diff --git a/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.assets.cache b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.assets.cache
new file mode 100644
index 0000000..8d551f0
Binary files /dev/null and b/CharacterPreview/obj/Release/netstandard2.1/CharacterPreview.assets.cache differ
diff --git a/CharacterPreview/obj/project.assets.json b/CharacterPreview/obj/project.assets.json
new file mode 100644
index 0000000..9fd268e
--- /dev/null
+++ b/CharacterPreview/obj/project.assets.json
@@ -0,0 +1,239 @@
+{
+ "version": 3,
+ "targets": {
+ ".NETStandard,Version=v2.1": {
+ "Lib.Harmony/2.4.1": {
+ "type": "package",
+ "dependencies": {
+ "Lib.Harmony.Ref": "2.4.1"
+ },
+ "compile": {
+ "lib/netstandard2.0/_._": {}
+ },
+ "runtime": {
+ "lib/netstandard2.0/_._": {}
+ }
+ },
+ "Lib.Harmony.Ref/2.4.1": {
+ "type": "package",
+ "dependencies": {
+ "System.Reflection.Emit": "4.7.0"
+ },
+ "compile": {
+ "ref/netstandard2.0/0Harmony.dll": {
+ "related": ".xml"
+ }
+ }
+ },
+ "System.Reflection.Emit/4.7.0": {
+ "type": "package",
+ "compile": {
+ "ref/netstandard2.1/_._": {}
+ },
+ "runtime": {
+ "lib/netstandard2.1/_._": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Lib.Harmony/2.4.1": {
+ "sha512": "iLTZi/kKKB18jYEIwReZSx2xXyVUh4J1swReMgvYBBBn4tzA1Nd0PJlVyntY5BDdSiXSxzmvjc/3OYfFs0YwFg==",
+ "type": "package",
+ "path": "lib.harmony/2.4.1",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "HarmonyLogo.png",
+ "LICENSE",
+ "README.md",
+ "lib.harmony.2.4.1.nupkg.sha512",
+ "lib.harmony.nuspec",
+ "lib/net35/0Harmony.dll",
+ "lib/net35/0Harmony.pdb",
+ "lib/net35/0Harmony.xml",
+ "lib/net452/0Harmony.dll",
+ "lib/net452/0Harmony.pdb",
+ "lib/net452/0Harmony.xml",
+ "lib/net472/0Harmony.dll",
+ "lib/net472/0Harmony.pdb",
+ "lib/net472/0Harmony.xml",
+ "lib/net48/0Harmony.dll",
+ "lib/net48/0Harmony.pdb",
+ "lib/net48/0Harmony.xml",
+ "lib/net5.0/0Harmony.dll",
+ "lib/net5.0/0Harmony.pdb",
+ "lib/net5.0/0Harmony.xml",
+ "lib/net6.0/0Harmony.dll",
+ "lib/net6.0/0Harmony.pdb",
+ "lib/net6.0/0Harmony.xml",
+ "lib/net7.0/0Harmony.dll",
+ "lib/net7.0/0Harmony.pdb",
+ "lib/net7.0/0Harmony.xml",
+ "lib/net8.0/0Harmony.dll",
+ "lib/net8.0/0Harmony.pdb",
+ "lib/net8.0/0Harmony.xml",
+ "lib/net9.0/0Harmony.dll",
+ "lib/net9.0/0Harmony.pdb",
+ "lib/net9.0/0Harmony.xml",
+ "lib/netcoreapp3.0/0Harmony.dll",
+ "lib/netcoreapp3.0/0Harmony.pdb",
+ "lib/netcoreapp3.0/0Harmony.xml",
+ "lib/netcoreapp3.1/0Harmony.dll",
+ "lib/netcoreapp3.1/0Harmony.pdb",
+ "lib/netcoreapp3.1/0Harmony.xml",
+ "lib/netstandard2.0/_._"
+ ]
+ },
+ "Lib.Harmony.Ref/2.4.1": {
+ "sha512": "+u1y2Qd6OlSUQ8JtrsrSo3adnAsrXMJ2YPYtbW+FAmdPI5yw34M9VX4bKl8ZwRuUzaGzZIz+oGMbn/yS4fWtZw==",
+ "type": "package",
+ "path": "lib.harmony.ref/2.4.1",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "HarmonyLogo.png",
+ "LICENSE",
+ "README.md",
+ "lib.harmony.ref.2.4.1.nupkg.sha512",
+ "lib.harmony.ref.nuspec",
+ "ref/netstandard2.0/0Harmony.dll",
+ "ref/netstandard2.0/0Harmony.xml"
+ ]
+ },
+ "System.Reflection.Emit/4.7.0": {
+ "sha512": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==",
+ "type": "package",
+ "path": "system.reflection.emit/4.7.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "LICENSE.TXT",
+ "THIRD-PARTY-NOTICES.TXT",
+ "lib/MonoAndroid10/_._",
+ "lib/MonoTouch10/_._",
+ "lib/net45/_._",
+ "lib/netcore50/System.Reflection.Emit.dll",
+ "lib/netcoreapp2.0/_._",
+ "lib/netstandard1.1/System.Reflection.Emit.dll",
+ "lib/netstandard1.1/System.Reflection.Emit.xml",
+ "lib/netstandard1.3/System.Reflection.Emit.dll",
+ "lib/netstandard2.0/System.Reflection.Emit.dll",
+ "lib/netstandard2.0/System.Reflection.Emit.xml",
+ "lib/netstandard2.1/_._",
+ "lib/xamarinios10/_._",
+ "lib/xamarinmac20/_._",
+ "lib/xamarintvos10/_._",
+ "lib/xamarinwatchos10/_._",
+ "ref/MonoAndroid10/_._",
+ "ref/MonoTouch10/_._",
+ "ref/net45/_._",
+ "ref/netcoreapp2.0/_._",
+ "ref/netstandard1.1/System.Reflection.Emit.dll",
+ "ref/netstandard1.1/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/de/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/es/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/fr/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/it/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/ja/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/ko/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/ru/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/zh-hans/System.Reflection.Emit.xml",
+ "ref/netstandard1.1/zh-hant/System.Reflection.Emit.xml",
+ "ref/netstandard2.0/System.Reflection.Emit.dll",
+ "ref/netstandard2.0/System.Reflection.Emit.xml",
+ "ref/netstandard2.1/_._",
+ "ref/xamarinios10/_._",
+ "ref/xamarinmac20/_._",
+ "ref/xamarintvos10/_._",
+ "ref/xamarinwatchos10/_._",
+ "runtimes/aot/lib/netcore50/System.Reflection.Emit.dll",
+ "runtimes/aot/lib/netcore50/System.Reflection.Emit.xml",
+ "system.reflection.emit.4.7.0.nupkg.sha512",
+ "system.reflection.emit.nuspec",
+ "useSharedDesignerContext.txt",
+ "version.txt"
+ ]
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETStandard,Version=v2.1": [
+ "Lib.Harmony >= 2.4.1"
+ ]
+ },
+ "packageFolders": {
+ "C:\\Users\\Lenovo\\.nuget\\packages\\": {},
+ "D:\\vsShare\\NuGetPackages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj",
+ "projectName": "CharacterPreview",
+ "projectPath": "D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj",
+ "packagesPath": "C:\\Users\\Lenovo\\.nuget\\packages\\",
+ "outputPath": "D:\\vs_project\\DuckovMods\\CharacterPreview\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "D:\\vsShare\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Lenovo\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netstandard2.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netstandard2.1": {
+ "targetAlias": "netstandard2.1",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ },
+ "SdkAnalysisLevel": "9.0.300"
+ },
+ "frameworks": {
+ "netstandard2.1": {
+ "targetAlias": "netstandard2.1",
+ "dependencies": {
+ "Lib.Harmony": {
+ "target": "Package",
+ "version": "[2.4.1, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "NETStandard.Library": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.306\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/CharacterPreview/obj/project.nuget.cache b/CharacterPreview/obj/project.nuget.cache
new file mode 100644
index 0000000..a1f200e
--- /dev/null
+++ b/CharacterPreview/obj/project.nuget.cache
@@ -0,0 +1,12 @@
+{
+ "version": 2,
+ "dgSpecHash": "7zqX1jgBbf8=",
+ "success": true,
+ "projectFilePath": "D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj",
+ "expectedPackageFiles": [
+ "C:\\Users\\Lenovo\\.nuget\\packages\\lib.harmony\\2.4.1\\lib.harmony.2.4.1.nupkg.sha512",
+ "C:\\Users\\Lenovo\\.nuget\\packages\\lib.harmony.ref\\2.4.1\\lib.harmony.ref.2.4.1.nupkg.sha512",
+ "C:\\Users\\Lenovo\\.nuget\\packages\\system.reflection.emit\\4.7.0\\system.reflection.emit.4.7.0.nupkg.sha512"
+ ],
+ "logs": []
+}
\ No newline at end of file
diff --git a/CharacterPreview/obj/project.packagespec.json b/CharacterPreview/obj/project.packagespec.json
new file mode 100644
index 0000000..a86e11d
--- /dev/null
+++ b/CharacterPreview/obj/project.packagespec.json
@@ -0,0 +1 @@
+"restore":{"projectUniqueName":"D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj","projectName":"CharacterPreview","projectPath":"D:\\vs_project\\DuckovMods\\CharacterPreview\\CharacterPreview.csproj","outputPath":"D:\\vs_project\\DuckovMods\\CharacterPreview\\obj\\","projectStyle":"PackageReference","fallbackFolders":["D:\\vsShare\\NuGetPackages"],"originalTargetFrameworks":["netstandard2.1"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"netstandard2.1":{"targetAlias":"netstandard2.1","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"},"SdkAnalysisLevel":"9.0.300"}"frameworks":{"netstandard2.1":{"targetAlias":"netstandard2.1","dependencies":{"Lib.Harmony":{"target":"Package","version":"[2.4.1, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"NETStandard.Library":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\9.0.306\\RuntimeIdentifierGraph.json"}}
\ No newline at end of file
diff --git a/CharacterPreview/obj/rider.project.model.nuget.info b/CharacterPreview/obj/rider.project.model.nuget.info
new file mode 100644
index 0000000..5eb4a45
--- /dev/null
+++ b/CharacterPreview/obj/rider.project.model.nuget.info
@@ -0,0 +1 @@
+17627872868371582
\ No newline at end of file
diff --git a/CharacterPreview/obj/rider.project.restore.info b/CharacterPreview/obj/rider.project.restore.info
new file mode 100644
index 0000000..5eb4a45
--- /dev/null
+++ b/CharacterPreview/obj/rider.project.restore.info
@@ -0,0 +1 @@
+17627872868371582
\ No newline at end of file
diff --git a/DuckovMods.sln b/DuckovMods.sln
index fa3fd60..23b2d9d 100644
--- a/DuckovMods.sln
+++ b/DuckovMods.sln
@@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Theme", "Theme\Theme.csproj
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SceneView", "SceneView\SceneView.csproj", "{87AA16B9-C7F9-456E-8F57-CE05F393D91F}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CharacterPreview", "CharacterPreview\CharacterPreview.csproj", "{4D2577DB-5915-40AC-869B-68C37D28AC8F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -45,6 +47,10 @@ Global
{87AA16B9-C7F9-456E-8F57-CE05F393D91F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87AA16B9-C7F9-456E-8F57-CE05F393D91F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87AA16B9-C7F9-456E-8F57-CE05F393D91F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4D2577DB-5915-40AC-869B-68C37D28AC8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4D2577DB-5915-40AC-869B-68C37D28AC8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4D2577DB-5915-40AC-869B-68C37D28AC8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4D2577DB-5915-40AC-869B-68C37D28AC8F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/DuckovMods.sln.DotSettings.user b/DuckovMods.sln.DotSettings.user
index fb9b486..337c416 100644
--- a/DuckovMods.sln.DotSettings.user
+++ b/DuckovMods.sln.DotSettings.user
@@ -1,10 +1,12 @@
+ True
True
True
True
True
True
True
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
@@ -17,13 +19,17 @@
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
@@ -31,17 +37,24 @@
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
+ ForceIncluded
+ ForceIncluded
ForceIncluded
+ ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
@@ -57,11 +70,15 @@
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
diff --git a/HideCharacter/obj/Debug/HideCharacter.AssemblyInfo.cs b/HideCharacter/obj/Debug/HideCharacter.AssemblyInfo.cs
index 92c28f4..c73c60a 100644
--- a/HideCharacter/obj/Debug/HideCharacter.AssemblyInfo.cs
+++ b/HideCharacter/obj/Debug/HideCharacter.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("折纸的小箱子")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.1")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1+786025f720c05ae486c8c66d3a6114633ccd0dbf")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
[assembly: System.Reflection.AssemblyProductAttribute("HideCharacter")]
[assembly: System.Reflection.AssemblyTitleAttribute("HideCharacter")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.1")]
diff --git a/HideCharacter/obj/Debug/HideCharacter.AssemblyInfoInputs.cache b/HideCharacter/obj/Debug/HideCharacter.AssemblyInfoInputs.cache
index 4611129..6c4d615 100644
--- a/HideCharacter/obj/Debug/HideCharacter.AssemblyInfoInputs.cache
+++ b/HideCharacter/obj/Debug/HideCharacter.AssemblyInfoInputs.cache
@@ -1 +1 @@
-5da31913e91a183301e6883819f7ba57fc0b3e4eba9910ae6ee0eafc05d2af54
+dc9e2512ec7accc32370dea781198b720358eb9814b7c9c591d009607f13a5e8
diff --git a/HideCharacter/obj/Release/HideCharacter.AssemblyInfo.cs b/HideCharacter/obj/Release/HideCharacter.AssemblyInfo.cs
index e4e57b3..4e5cdba 100644
--- a/HideCharacter/obj/Release/HideCharacter.AssemblyInfo.cs
+++ b/HideCharacter/obj/Release/HideCharacter.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("折纸的小箱子")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.1")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1+786025f720c05ae486c8c66d3a6114633ccd0dbf")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
[assembly: System.Reflection.AssemblyProductAttribute("HideCharacter")]
[assembly: System.Reflection.AssemblyTitleAttribute("HideCharacter")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.1")]
diff --git a/HideCharacter/obj/Release/HideCharacter.AssemblyInfoInputs.cache b/HideCharacter/obj/Release/HideCharacter.AssemblyInfoInputs.cache
index 9e7b02e..24105c3 100644
--- a/HideCharacter/obj/Release/HideCharacter.AssemblyInfoInputs.cache
+++ b/HideCharacter/obj/Release/HideCharacter.AssemblyInfoInputs.cache
@@ -1 +1 @@
-12b8810f5c5efba722348e9a42589fd931584289646df256a80c8a5aac0c67b6
+71229c5bb112e72727f560fc4c2dcb61c8790b85769f99a1131c10e137989a56
diff --git a/HitFeedback/obj/Debug/HitFeedback.AssemblyInfo.cs b/HitFeedback/obj/Debug/HitFeedback.AssemblyInfo.cs
index 47ed931..c2a090d 100644
--- a/HitFeedback/obj/Debug/HitFeedback.AssemblyInfo.cs
+++ b/HitFeedback/obj/Debug/HitFeedback.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("HitFeedback")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
[assembly: System.Reflection.AssemblyProductAttribute("HitFeedback")]
[assembly: System.Reflection.AssemblyTitleAttribute("HitFeedback")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/HitFeedback/obj/Debug/HitFeedback.AssemblyInfoInputs.cache b/HitFeedback/obj/Debug/HitFeedback.AssemblyInfoInputs.cache
index f3e01a8..dc56c0e 100644
--- a/HitFeedback/obj/Debug/HitFeedback.AssemblyInfoInputs.cache
+++ b/HitFeedback/obj/Debug/HitFeedback.AssemblyInfoInputs.cache
@@ -1 +1 @@
-011b05448cb33a5df382363baa29281f37b1217de1b772941e072e5e1e318697
+368a9f7418aefa097e80abe04f0e70d25ca97877e818b633d54a07496a4eb4d6
diff --git a/HitFeedback/obj/Release/HitFeedback.AssemblyInfo.cs b/HitFeedback/obj/Release/HitFeedback.AssemblyInfo.cs
index 7b66a69..d908505 100644
--- a/HitFeedback/obj/Release/HitFeedback.AssemblyInfo.cs
+++ b/HitFeedback/obj/Release/HitFeedback.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("HitFeedback")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
[assembly: System.Reflection.AssemblyProductAttribute("HitFeedback")]
[assembly: System.Reflection.AssemblyTitleAttribute("HitFeedback")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/HitFeedback/obj/Release/HitFeedback.AssemblyInfoInputs.cache b/HitFeedback/obj/Release/HitFeedback.AssemblyInfoInputs.cache
index 62798cc..c69b649 100644
--- a/HitFeedback/obj/Release/HitFeedback.AssemblyInfoInputs.cache
+++ b/HitFeedback/obj/Release/HitFeedback.AssemblyInfoInputs.cache
@@ -1 +1 @@
-d5e421014b0d794da78442d8a65960e244ed2b8a5d6b7b2541d1354650cfeae5
+11eb56433e596da88b772bc3383f597712eafe48622740bf0786e8030e13d6e9
diff --git a/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfo.cs b/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfo.cs
index c0e3e31..17baca1 100644
--- a/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfo.cs
+++ b/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("折纸的小箱子")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
[assembly: System.Reflection.AssemblyProductAttribute("SceneSnapshot")]
[assembly: System.Reflection.AssemblyTitleAttribute("SceneSnapshot")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]
diff --git a/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfoInputs.cache b/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfoInputs.cache
index c2e6df2..7940298 100644
--- a/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfoInputs.cache
+++ b/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfoInputs.cache
@@ -1 +1 @@
-d0b14bb5a2fe44e4165960f86b2001d300338f5655dddb8b391c1544fb8fcca4
+993bfd6f35451c9a8b17b20fe9cf49f2468dd9f29516d3ea773a01d0f4d44c33
diff --git a/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfo.cs b/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfo.cs
index 5dc9bfb..57edfd5 100644
--- a/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfo.cs
+++ b/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("折纸的小箱子")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9b9121897387fa7e2a57d76690a2a9ae848b1705")]
[assembly: System.Reflection.AssemblyProductAttribute("SceneSnapshot")]
[assembly: System.Reflection.AssemblyTitleAttribute("SceneSnapshot")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]
diff --git a/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfoInputs.cache b/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfoInputs.cache
index 0b5a2ab..25e5d0b 100644
--- a/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfoInputs.cache
+++ b/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfoInputs.cache
@@ -1 +1 @@
-0377007546f92d23941a0c0e6a0cef8c6022db4ce07a6a7b98556714f9c594f1
+ca1555b48da049a281894ed9d271c1d8ac9ceef6558c6d583a8608bf7fa55818
diff --git a/SceneView/CanvasControl.cs b/SceneView/CanvasControl.cs
index 5dc5f27..5bb7751 100644
--- a/SceneView/CanvasControl.cs
+++ b/SceneView/CanvasControl.cs
@@ -6,13 +6,35 @@ namespace SceneView
{
public class CanvasControl : MonoBehaviour
{
- public SceneViewPanel? sceneViewPanel;
-
+ public const string ViewCanvasName = "_SceneViewCanvas";
+ public const string ShowAim = "";
+
public static Vector2 panelSize = new Vector2(500, 800);
- public const string ViewCanvasName = "_SceneViewCanvas";
- public const string ShowAim = "LOGO";
-
+ private static GameObject _focusObject;
+ public SceneViewPanel? sceneViewPanel;
+ public ParametersPanel? parametersPanel;
+
+ public static GameObject FocusGameObject
+ {
+ get => _focusObject;
+ set
+ {
+ if (value != _focusObject)
+ {
+ if (_focusObject)
+ {
+ var outline=_focusObject.GetComponent();
+ if (outline)
+ Destroy(outline);
+ }
+ _focusObject = value;
+ _focusObject.AddComponent();
+ OnChangeFocusObject?.Invoke(value);
+ }
+ }
+ }
+
private void Start()
{
InitCanvas();
@@ -20,17 +42,26 @@ namespace SceneView
public void Update()
{
- if (Input.GetKeyDown(KeyCode.F2))
+ if (Input.GetKeyDown(KeyCode.F3))
{
- Debug.Log("切换");
+ // Debug.Log("切换");
+ parametersPanel.gameObject.SetActive(!parametersPanel.gameObject.activeSelf);
sceneViewPanel.gameObject.SetActive(!sceneViewPanel.gameObject.activeSelf);
- if (sceneViewPanel.gameObject.activeSelf)
- {
- sceneViewPanel.Refresh();
- }
}
+ // if (sceneViewPanel.gameObject.activeSelf)
+ // {
+ // sceneViewPanel.Refresh();
+ // }
}
+ private void OnDestroy()
+ {
+ if (sceneViewPanel) Destroy(sceneViewPanel.gameObject);
+ if (parametersPanel) Destroy(parametersPanel.gameObject);
+ }
+
+ public static event Action OnChangeFocusObject;
+
private void InitCanvas()
{
var canvasObj = new GameObject(ViewCanvasName);
@@ -41,11 +72,13 @@ namespace SceneView
canvasObj.AddComponent();
DontDestroyOnLoad(canvasObj);
- sceneViewPanel=CreateSceneViewPanel(canvasObj.transform);
+ sceneViewPanel = CreateSceneViewPanel(canvasObj.transform);
+ parametersPanel = CreateParametersPanel(canvasObj.transform);
}
+
public static SceneViewPanel CreateSceneViewPanel(Transform parent)
{
- var panelObj = new GameObject("SceneViewPanel");
+ var panelObj = new GameObject(ViewCanvasName);
panelObj.transform.SetParent(parent, false);
var sceneViewPanel = panelObj.AddComponent();
var panelImage = panelObj.AddComponent();
@@ -56,5 +89,15 @@ namespace SceneView
return sceneViewPanel;
}
+
+ public ParametersPanel CreateParametersPanel(Transform parent)
+ {
+ var panelObj = new GameObject(ViewCanvasName);
+ panelObj.transform.SetParent(parent, false);
+ var parametersViewPanel = panelObj.AddComponent();
+ var panelImage = panelObj.AddComponent();
+ panelImage.color = new Color(0.5f, 0.5f, 0.5f, 0.3f);
+ return parametersViewPanel;
+ }
}
}
\ No newline at end of file
diff --git a/SceneView/ControlUtilities.cs b/SceneView/ControlUtilities.cs
index d3ebae8..8905855 100644
--- a/SceneView/ControlUtilities.cs
+++ b/SceneView/ControlUtilities.cs
@@ -1,11 +1,14 @@
-using System;
-using TMPro;
-using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
+using UnityEngine;
+using System;
+using System.Collections.Generic;
+using TMPro;
namespace SceneView
{
+
+
[Serializable]
public struct RectTransformConfig
{
@@ -19,13 +22,24 @@ namespace SceneView
// 默认配置
public static readonly RectTransformConfig Default = new RectTransformConfig(
- anchorMin: new Vector2(0, 1),
- anchorMax: new Vector2(0, 1),
- anchoredPosition: Vector2.zero,
- sizeDelta: Vector2.zero,
- offsetMin: Vector2.zero,
- offsetMax: Vector2.zero,
- pivot: new Vector2(0.5f, 0.5f) // 默认居中轴心点
+ Vector2.up, // 锚点最小:左上角 (0, 1)
+ Vector2.up, // 锚点最大:左上角 (0, 1)
+ Vector2.zero,
+ Vector2.zero,
+ Vector2.zero,
+ Vector2.zero,
+ new Vector2(0.5f, 0.5f) // 默认居中轴心点
+ );
+
+ // 填充父级的配置
+ public static readonly RectTransformConfig FillParent = new RectTransformConfig(
+ Vector2.zero, // 锚点最小:左下角 (0, 0)
+ Vector2.one, // 锚点最大:右上角 (1, 1)
+ Vector2.zero,
+ Vector2.zero, // sizeDelta为零表示通过offsetMin/Max来控制尺寸
+ Vector2.zero,
+ Vector2.zero,
+ new Vector2(0.5f, 0.5f)
);
public RectTransformConfig(
@@ -58,12 +72,12 @@ namespace SceneView
public bool RaycastTarget;
public static readonly ButtonConfig Default = new ButtonConfig(
- rectConfig: RectTransformConfig.Default,
- backgroundColor: new Color(0.2f, 0.2f, 0.2f, 1f),
- text: "Button",
- fontSize: 18,
- textColor: Color.white,
- raycastTarget: true
+ RectTransformConfig.Default,
+ new Color(0.2f, 0.2f, 0.2f, 1f),
+ "Button",
+ 18,
+ Color.white,
+ true
);
public ButtonConfig(
@@ -122,7 +136,7 @@ namespace SceneView
[Serializable]
public struct ScrollViewConfig
{
- public Vector2 SizeDelta; // ScrollView 的尺寸
+ public RectTransformConfig RectConfig; // 新增:ScrollView自身的RectTransform配置
public bool Vertical;
public bool Horizontal;
public Color BackgroundColor;
@@ -130,7 +144,15 @@ namespace SceneView
public static readonly ScrollViewConfig Default = new ScrollViewConfig
{
- SizeDelta = new Vector2(400, 300),
+ RectConfig = new RectTransformConfig(
+ new Vector2(0.5f, 0.5f), // 锚点最小:中心 (0.5, 0.5)
+ new Vector2(0.5f, 0.5f), // 锚点最大:中心 (0.5, 0.5)
+ Vector2.zero,
+ new Vector2(400, 300), // 默认尺寸
+ Vector2.zero,
+ Vector2.zero,
+ new Vector2(0.5f, 0.5f)
+ ),
Vertical = true,
Horizontal = false,
BackgroundColor = new Color(0.1f, 0.1f, 0.1f, 0.8f),
@@ -151,18 +173,20 @@ namespace SceneView
public TextAlignmentOptions TextAlignment;
public TMP_InputField.CharacterValidation CharacterValidation;
public int CharacterLimit;
+
public static readonly InputFieldConfig Default = new InputFieldConfig(
- rectConfig: RectTransformConfig.Default,
- backgroundColor: new Color(0.2f, 0.2f, 0.2f, 1f),
- placeholderText: "Enter text here",
- placeholderFontSize: 14,
- placeholderTextColor: new Color(0.7f, 0.7f, 0.7f, 1f),
- textColor: Color.white,
- fontSize: 18,
- textAlignment: TextAlignmentOptions.Left,
- characterValidation: TMP_InputField.CharacterValidation.None,
- characterLimit: 0
+ RectTransformConfig.Default,
+ new Color(0.2f, 0.2f, 0.2f, 1f),
+ "Enter text here",
+ 14,
+ new Color(0.7f, 0.7f, 0.7f, 1f),
+ Color.white,
+ 18,
+ TextAlignmentOptions.Left,
+ TMP_InputField.CharacterValidation.None,
+ 0
);
+
public InputFieldConfig(
RectTransformConfig rectConfig,
Color backgroundColor,
@@ -188,6 +212,143 @@ namespace SceneView
}
}
+ [Serializable]
+ public struct LabeledInputFieldConfig
+ {
+ public RectTransformConfig RectConfig; // 整个控件(标签+输入框)的配置
+ public string LabelText;
+ public int LabelFontSize;
+ public Color LabelTextColor;
+ public float LabelWidth; // 标签部分的固定宽度
+ public float Spacing; // 标签和输入框之间的间距
+ public InputFieldConfig InputFieldConfig; // 复用已有的输入框配置
+
+ public static readonly LabeledInputFieldConfig Default = new LabeledInputFieldConfig
+ {
+ RectConfig = new RectTransformConfig(
+ Vector2.up, // 锚点最小:左上角 (0, 1)
+ Vector2.one, // 锚点最大:右上角 (1, 1),默认水平拉伸
+ Vector2.zero,
+ new Vector2(0, 30), // 默认高度30
+ Vector2.zero,
+ Vector2.zero,
+ new Vector2(0.5f, 1) // 轴心点:顶部居中
+ ),
+ LabelText = "Label",
+ LabelFontSize = 18,
+ LabelTextColor = Color.white,
+ LabelWidth = 100f,
+ Spacing = 10f,
+ InputFieldConfig = InputFieldConfig.Default
+ };
+ }
+
+ [Serializable]
+ public struct DropdownConfig
+ {
+ public RectTransformConfig RectConfig;
+ public List Options;
+ public Color BackgroundColor;
+ public int CaptionFontSize; // 下拉框当前选中项的文本大小
+ public Color CaptionTextColor;
+ public int ItemFontSize; // 下拉列表每一项的文本大小
+ public Color ItemTextColor;
+
+ public static readonly DropdownConfig Default = new DropdownConfig(
+ new RectTransformConfig(
+ new Vector2(0.5f, 0.5f), // 锚点最小:中心 (0.5, 0.5)
+ new Vector2(0.5f, 0.5f), // 锚点最大:中心 (0.5, 0.5)
+ Vector2.zero,
+ new Vector2(160, 30),
+ Vector2.zero,
+ Vector2.zero,
+ new Vector2(0.5f, 0.5f)
+ ),
+ new List { "Option A", "Option B", "Option C" },
+ new Color(0.2f, 0.2f, 0.2f, 1f),
+ 18,
+ Color.white,
+ 16,
+ Color.white
+ );
+
+ public DropdownConfig(RectTransformConfig rectConfig, List options, Color backgroundColor,
+ int captionFontSize, Color captionTextColor, int itemFontSize, Color itemTextColor)
+ {
+ RectConfig = rectConfig;
+ Options = options;
+ BackgroundColor = backgroundColor;
+ CaptionFontSize = captionFontSize;
+ CaptionTextColor = captionTextColor;
+ ItemFontSize = itemFontSize;
+ ItemTextColor = itemTextColor;
+ }
+ }
+
+ [Serializable]
+ public struct LabeledDropdownConfig
+ {
+ public RectTransformConfig RectConfig;
+ public string LabelText;
+ public int LabelFontSize;
+ public Color LabelTextColor;
+ public float LabelWidth;
+ public float Spacing;
+ public DropdownConfig DropdownConfig;
+
+ public static readonly LabeledDropdownConfig Default = new LabeledDropdownConfig
+ {
+ RectConfig = new RectTransformConfig(
+ Vector2.up, // 锚点最小:左上角 (0, 1)
+ Vector2.one, // 锚点最大:右上角 (1, 1)
+ Vector2.zero,
+ new Vector2(0, 30),
+ Vector2.zero,
+ Vector2.zero,
+ new Vector2(0.5f, 1)
+ ),
+ LabelText = "Label",
+ LabelFontSize = 18,
+ LabelTextColor = Color.white,
+ LabelWidth = 100f,
+ Spacing = 10f,
+ DropdownConfig = DropdownConfig.Default
+ };
+ }
+
+ [Serializable]
+ public struct ToggleConfig
+ {
+ public RectTransformConfig RectConfig;
+ public string LabelText;
+ public int LabelFontSize;
+ public Color LabelTextColor;
+ public Color BackgroundColor;
+ public Color CheckmarkColor;
+ public float Spacing; // 开关图形和标签之间的间距
+ public bool IsOnByDefault;
+
+ public static readonly ToggleConfig Default = new ToggleConfig
+ {
+ RectConfig = new RectTransformConfig(
+ Vector2.up, // 锚点最小:左上角 (0, 1)
+ Vector2.up, // 锚点最大:左上角 (0, 1)
+ Vector2.zero,
+ new Vector2(160, 20),
+ Vector2.zero,
+ Vector2.zero,
+ new Vector2(0.5f, 0.5f)
+ ),
+ LabelText = "Toggle",
+ LabelFontSize = 18,
+ LabelTextColor = Color.white,
+ BackgroundColor = new Color(0.2f, 0.2f, 0.2f, 1f),
+ CheckmarkColor = new Color(0.1f, 0.6f, 1f, 1f),
+ Spacing = 10f,
+ IsOnByDefault = false
+ };
+ }
+
public static class ControlUtilities
{
// 通用方法:将 RectTransformConfig 应用于 RectTransform
@@ -197,9 +358,12 @@ namespace SceneView
rectTransform.anchorMax = config.AnchorMax;
rectTransform.pivot = config.Pivot;
- var isStretched = config.SizeDelta == Vector2.zero;
-
- if (isStretched)
+ // 当sizeDelta为Vector2.zero时,我们假定用户希望通过offsetMin/Max来拉伸元素
+ // 否则使用anchoredPosition和sizeDelta来定位和设置尺寸
+ if (config.SizeDelta == Vector2.zero && (config.OffsetMin != Vector2.zero ||
+ config.OffsetMax != Vector2.zero ||
+ (config.AnchorMin == Vector2.zero &&
+ config.AnchorMax == Vector2.one)))
{
rectTransform.offsetMin = config.OffsetMin;
rectTransform.offsetMax = config.OffsetMax;
@@ -211,45 +375,48 @@ namespace SceneView
}
}
+ // ========================
+ // 矩形对象创建
+ // ========================
+ ///
+ /// 创建一个带有 RectTransform 组件的空 GameObject。
+ ///
+ /// 父级 Transform。
+ /// GameObject 的名称。
+ /// RectTransform 的配置。
+ /// 创建的 RectTransform 组件。
+ public static RectTransform CreateRect(Transform parent, string name, RectTransformConfig config)
+ {
+ var obj = new GameObject(name);
+ var rect = obj.AddComponent();
+ rect.SetParent(parent, false); // false表示不保留世界坐标,而是以父级为基准
+ ApplyRectTransformConfig(rect, config);
+ return rect;
+ }
+
// ========================
// 按钮创建
// ========================
public static (Button? button, TextMeshProUGUI? text) CreateButton(RectTransform? parent, ButtonConfig config,
UnityAction? onClick)
{
- var btnObj = new GameObject(config.Text + "Button");
- var btnRect = btnObj.AddComponent();
- btnRect.SetParent(parent, false);
+ // 使用 CreateRect 创建按钮根对象并应用配置
+ var btnRect = CreateRect(parent, config.Text + "Button", config.RectConfig);
- ApplyRectTransformConfig(btnRect, config.RectConfig);
-
- var button = btnObj.AddComponent