diff --git a/DuckovMods.sln b/DuckovMods.sln index 56628e3..fa3fd60 100644 --- a/DuckovMods.sln +++ b/DuckovMods.sln @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UIFrame", "UIFrame\UIFrame. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Theme", "Theme\Theme.csproj", "{7CCF2612-AF15-42F0-B472-8C8F8CAB9B20}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SceneView", "SceneView\SceneView.csproj", "{87AA16B9-C7F9-456E-8F57-CE05F393D91F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +41,10 @@ Global {7CCF2612-AF15-42F0-B472-8C8F8CAB9B20}.Debug|Any CPU.Build.0 = Debug|Any CPU {7CCF2612-AF15-42F0-B472-8C8F8CAB9B20}.Release|Any CPU.ActiveCfg = Release|Any CPU {7CCF2612-AF15-42F0-B472-8C8F8CAB9B20}.Release|Any CPU.Build.0 = Release|Any CPU + {87AA16B9-C7F9-456E-8F57-CE05F393D91F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DuckovMods.sln.DotSettings.user b/DuckovMods.sln.DotSettings.user index 7861586..fb9b486 100644 --- a/DuckovMods.sln.DotSettings.user +++ b/DuckovMods.sln.DotSettings.user @@ -1,8 +1,11 @@  True + True True + True True True + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -18,6 +21,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -25,8 +29,10 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -38,6 +44,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -46,6 +53,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -53,6 +61,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded diff --git a/HideCharacter/obj/Debug/HideCharacter.AssemblyInfo.cs b/HideCharacter/obj/Debug/HideCharacter.AssemblyInfo.cs index f10f434..92c28f4 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+0206a83f56b5a794fe2f173b4a047cc4f0d4cd90")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1+786025f720c05ae486c8c66d3a6114633ccd0dbf")] [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 6fd36ab..4611129 100644 --- a/HideCharacter/obj/Debug/HideCharacter.AssemblyInfoInputs.cache +++ b/HideCharacter/obj/Debug/HideCharacter.AssemblyInfoInputs.cache @@ -1 +1 @@ -87960f6ca296aa48c51c30197c7d764ab1cc8c1b2d2ae919555af9f2602b2fa1 +5da31913e91a183301e6883819f7ba57fc0b3e4eba9910ae6ee0eafc05d2af54 diff --git a/HideCharacter/obj/Debug/HideCharacter.csproj.AssemblyReference.cache b/HideCharacter/obj/Debug/HideCharacter.csproj.AssemblyReference.cache index 305f460..ec99aeb 100644 Binary files a/HideCharacter/obj/Debug/HideCharacter.csproj.AssemblyReference.cache and b/HideCharacter/obj/Debug/HideCharacter.csproj.AssemblyReference.cache differ diff --git a/HideCharacter/obj/Release/HideCharacter.AssemblyInfo.cs b/HideCharacter/obj/Release/HideCharacter.AssemblyInfo.cs index 071b266..e4e57b3 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+5d69efbc3f80a5422cef0884e02fb27adf20b467")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1+786025f720c05ae486c8c66d3a6114633ccd0dbf")] [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 d3fc787..9e7b02e 100644 --- a/HideCharacter/obj/Release/HideCharacter.AssemblyInfoInputs.cache +++ b/HideCharacter/obj/Release/HideCharacter.AssemblyInfoInputs.cache @@ -1 +1 @@ -769c2595fb11f290049896c9b627f3b39daef1dc9f833f4947c915142e78d8d2 +12b8810f5c5efba722348e9a42589fd931584289646df256a80c8a5aac0c67b6 diff --git a/HideCharacter/obj/Release/HideCharacter.csproj.AssemblyReference.cache b/HideCharacter/obj/Release/HideCharacter.csproj.AssemblyReference.cache index 305f460..ec99aeb 100644 Binary files a/HideCharacter/obj/Release/HideCharacter.csproj.AssemblyReference.cache and b/HideCharacter/obj/Release/HideCharacter.csproj.AssemblyReference.cache differ diff --git a/HideCharacter/obj/rider.project.model.nuget.info b/HideCharacter/obj/rider.project.model.nuget.info index 38a6735..ea4a121 100644 --- a/HideCharacter/obj/rider.project.model.nuget.info +++ b/HideCharacter/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17619928534493660 \ No newline at end of file +17623343068138064 \ No newline at end of file diff --git a/HitFeedback/obj/Debug/HitFeedback.AssemblyInfo.cs b/HitFeedback/obj/Debug/HitFeedback.AssemblyInfo.cs index 5f25c1f..47ed931 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+0206a83f56b5a794fe2f173b4a047cc4f0d4cd90")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")] [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 d0103aa..f3e01a8 100644 --- a/HitFeedback/obj/Debug/HitFeedback.AssemblyInfoInputs.cache +++ b/HitFeedback/obj/Debug/HitFeedback.AssemblyInfoInputs.cache @@ -1 +1 @@ -0e8871f70d957c8690d2d7e899b7c26cc6fec6a1db85ba1988bdbe458697eb11 +011b05448cb33a5df382363baa29281f37b1217de1b772941e072e5e1e318697 diff --git a/HitFeedback/obj/Debug/HitFeedback.csproj.AssemblyReference.cache b/HitFeedback/obj/Debug/HitFeedback.csproj.AssemblyReference.cache index 1b2ae5d..b613ff8 100644 Binary files a/HitFeedback/obj/Debug/HitFeedback.csproj.AssemblyReference.cache and b/HitFeedback/obj/Debug/HitFeedback.csproj.AssemblyReference.cache differ diff --git a/HitFeedback/obj/Release/HitFeedback.AssemblyInfo.cs b/HitFeedback/obj/Release/HitFeedback.AssemblyInfo.cs index e283802..7b66a69 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+5d69efbc3f80a5422cef0884e02fb27adf20b467")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")] [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 462cb5e..62798cc 100644 --- a/HitFeedback/obj/Release/HitFeedback.AssemblyInfoInputs.cache +++ b/HitFeedback/obj/Release/HitFeedback.AssemblyInfoInputs.cache @@ -1 +1 @@ -fa83406df4fd7108a6156ab0271b4cddce6abc73c66cbcefdb2f1419643481ef +d5e421014b0d794da78442d8a65960e244ed2b8a5d6b7b2541d1354650cfeae5 diff --git a/HitFeedback/obj/Release/HitFeedback.csproj.AssemblyReference.cache b/HitFeedback/obj/Release/HitFeedback.csproj.AssemblyReference.cache index 2f0b834..b613ff8 100644 Binary files a/HitFeedback/obj/Release/HitFeedback.csproj.AssemblyReference.cache and b/HitFeedback/obj/Release/HitFeedback.csproj.AssemblyReference.cache differ diff --git a/HitFeedback/obj/rider.project.model.nuget.info b/HitFeedback/obj/rider.project.model.nuget.info index b4b6f59..ea4a121 100644 --- a/HitFeedback/obj/rider.project.model.nuget.info +++ b/HitFeedback/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17620100186005303 \ No newline at end of file +17623343068138064 \ No newline at end of file diff --git a/MyMainMenu/GameMainTitle.cs b/MyMainMenu/GameMainTitle.cs new file mode 100644 index 0000000..6bb9422 --- /dev/null +++ b/MyMainMenu/GameMainTitle.cs @@ -0,0 +1,66 @@ +using System; +using TMPro; +using UnityEngine; +using UnityEngine.UI; +using Object = UnityEngine.Object; + +namespace MyMainMenu +{ + public class GameMainTitle + { + public string mainTitleObjName = "MainTitle"; + private GameObject? titleObject; + private Image? logoImage; + private Sprite? logoSprite; + + public void Initialize() + { + Debug.Log("Initialize method started."); + // 查找所有 GameObject,并筛选出名称匹配的对象 + GameObject[] allObjects = Object.FindObjectsOfType(); + titleObject = Array.Find(allObjects, obj => obj.name == mainTitleObjName); + if (titleObject == null) + { + Debug.LogWarning("titleObject not found with name: " + mainTitleObjName); + return; + } + logoImage = titleObject.GetComponentInChildren(true); + if (logoImage != null) + { + Debug.Log("Image component found on titleObject."); + var texture = ImageLoader.LoadImageFromFile(@"C:\Users\Lenovo\Pictures\异噬.png"); + if (texture != null) + { + Debug.Log("Texture loaded successfully."); + logoSprite=Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.zero); + logoImage.sprite = logoSprite; + Debug.Log("Sprite created and assigned to image component."); + } + else + { + Debug.LogError("Failed to load texture from file: C:\\Users\\Lenovo\\Pictures\\异噬.png"); + } + } + else + { + Debug.LogWarning("Image component not found on titleObject."); + } + Debug.Log("Initialize method finished."); + } + + public void SetTitle() + { + + } + + public void Update() + { + if (logoImage!=null&&logoImage.sprite!=logoSprite) + { + Debug.Log("logoImage is not null and its sprite is different from logoSprite. Updating logoImage.sprite."); // Add Log inside the if condition + logoImage.sprite = logoSprite; + } + } + + } +} \ No newline at end of file diff --git a/MyMainMenu/ImageLoader.cs b/MyMainMenu/ImageLoader.cs new file mode 100644 index 0000000..41bfa86 --- /dev/null +++ b/MyMainMenu/ImageLoader.cs @@ -0,0 +1,67 @@ +using System; +using System.IO; +using UnityEngine; + +namespace MyMainMenu +{ + public class ImageLoader + { + /// + /// 从指定文件路径加载图片并创建 Texture2D。 + /// 支持常用的图片格式 (如 .png, .jpg, .jpeg, .bmp, .tga) + /// + /// 图片文件的绝对路径。 + /// 如果为true,则创建一个新的Texture2D对象并加载图片数据。如果为false,它会尝试加载到默认的空白Texture2D对象上,但通常建议使用true。 + /// 指定纹理是否加载为线性颜色空间 (true) 或 sRGB 颜色空间 (false)。 + /// 加载成功的 Texture2D 对象,如果失败则返回 null。 + public static Texture2D? LoadImageFromFile(string filePath, bool createNewTexture = true, bool linear = false) + { + if (string.IsNullOrEmpty(filePath)) + { + Debug.LogError("ImageLoader: 图片文件路径为空或无效。"); + return null; + } + + if (!File.Exists(filePath)) + { + Debug.LogError($"ImageLoader: 文件不存在于路径: {filePath}"); + return null; + } + + Texture2D? texture = null; + try + { + var fileData = File.ReadAllBytes(filePath); + if (createNewTexture) + { + texture = new Texture2D(2, 2, TextureFormat.RGBA32, false, linear); + } + else if (texture == null) + { + Debug.LogError("ImageLoader: 未能提供现有Texture2D用于加载,且createNewTexture为false。"); + return null; + } + + var success = texture.LoadImage(fileData, true); + + if (!success) + { + Debug.LogError($"ImageLoader: 无法加载图片数据到Texture2D。请检查文件是否为有效的图片格式或是否损坏: {filePath}"); + UnityEngine.Object.Destroy(texture); // 销毁失败的纹理对象 + return null; + } + return texture; + } + catch (Exception ex) + { + Debug.LogError($"ImageLoader: 加载图片时发生错误: {filePath} - {ex.Message}"); + if (texture != null) + { + UnityEngine.Object.Destroy(texture); // 发生异常时销毁已创建的纹理 + } + + return null; + } + } + } +} \ No newline at end of file diff --git a/MyMainMenu/ModBehaviour.cs b/MyMainMenu/ModBehaviour.cs new file mode 100644 index 0000000..92b0588 --- /dev/null +++ b/MyMainMenu/ModBehaviour.cs @@ -0,0 +1,40 @@ +using System; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace MyMainMenu +{ + public class ModBehaviour:Duckov.Modding.ModBehaviour + { + public GameMainTitle gameMainTitle=new GameMainTitle(); + + void Awake() + { + SceneManager.sceneLoaded += OnSceneLoaded; + } + void OnDestroy() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + } + + private void Update() + { + gameMainTitle.Update(); + } + + protected override void OnAfterSetup() + { + + } + + protected override void OnBeforeDeactivate() + { + + } + void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + gameMainTitle.Initialize(); + } + + } +} \ No newline at end of file diff --git a/MyMainMenu/MyMainMenu.csproj b/MyMainMenu/MyMainMenu.csproj new file mode 100644 index 0000000..006b109 --- /dev/null +++ b/MyMainMenu/MyMainMenu.csproj @@ -0,0 +1,25 @@ + + + + netstandard2.1 + enable + D:\steam\steamapps\common\Escape from Duckov + false + + + + D:\steam\steamapps\common\Escape from Duckov\Duckov_Data\Mods\MyMainMenu + false + none + + + + + + + + + + + + diff --git a/MyMainMenu/obj/MyMainMenu.csproj.nuget.dgspec.json b/MyMainMenu/obj/MyMainMenu.csproj.nuget.dgspec.json new file mode 100644 index 0000000..d573fa0 --- /dev/null +++ b/MyMainMenu/obj/MyMainMenu.csproj.nuget.dgspec.json @@ -0,0 +1,79 @@ +{ + "format": 1, + "restore": { + "D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.csproj": {} + }, + "projects": { + "D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.csproj", + "projectName": "MyMainMenu", + "projectPath": "D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.csproj", + "packagesPath": "C:\\Users\\Lenovo\\.nuget\\packages\\", + "outputPath": "D:\\vs_project\\DuckovMods\\MyMainMenu\\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/MyMainMenu/obj/MyMainMenu.csproj.nuget.g.props b/MyMainMenu/obj/MyMainMenu.csproj.nuget.g.props new file mode 100644 index 0000000..2e378fe --- /dev/null +++ b/MyMainMenu/obj/MyMainMenu.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/MyMainMenu/obj/MyMainMenu.csproj.nuget.g.targets b/MyMainMenu/obj/MyMainMenu.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/MyMainMenu/obj/MyMainMenu.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/MyMainMenu/obj/Release/.NETStandard,Version=v2.1.AssemblyAttributes.cs b/MyMainMenu/obj/Release/.NETStandard,Version=v2.1.AssemblyAttributes.cs new file mode 100644 index 0000000..348b87f --- /dev/null +++ b/MyMainMenu/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/MyMainMenu/obj/Release/MyMainMenu.AssemblyInfo.cs b/MyMainMenu/obj/Release/MyMainMenu.AssemblyInfo.cs new file mode 100644 index 0000000..00892cd --- /dev/null +++ b/MyMainMenu/obj/Release/MyMainMenu.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("MyMainMenu")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")] +[assembly: System.Reflection.AssemblyProductAttribute("MyMainMenu")] +[assembly: System.Reflection.AssemblyTitleAttribute("MyMainMenu")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// 由 MSBuild WriteCodeFragment 类生成。 + diff --git a/MyMainMenu/obj/Release/MyMainMenu.AssemblyInfoInputs.cache b/MyMainMenu/obj/Release/MyMainMenu.AssemblyInfoInputs.cache new file mode 100644 index 0000000..44c4bfa --- /dev/null +++ b/MyMainMenu/obj/Release/MyMainMenu.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +b3ef56f4757a02383188b14d0c23f7bbd423d41a4f4cba0a12acb8688e7f7494 diff --git a/MyMainMenu/obj/Release/MyMainMenu.GeneratedMSBuildEditorConfig.editorconfig b/MyMainMenu/obj/Release/MyMainMenu.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..19ccc75 --- /dev/null +++ b/MyMainMenu/obj/Release/MyMainMenu.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,8 @@ +is_global = true +build_property.RootNamespace = MyMainMenu +build_property.ProjectDir = D:\vs_project\DuckovMods\MyMainMenu\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.CsWinRTUseWindowsUIXamlProjections = false +build_property.EffectiveAnalysisLevelStyle = +build_property.EnableCodeStyleSeverity = diff --git a/MyMainMenu/obj/Release/MyMainMenu.assets.cache b/MyMainMenu/obj/Release/MyMainMenu.assets.cache new file mode 100644 index 0000000..6e717da Binary files /dev/null and b/MyMainMenu/obj/Release/MyMainMenu.assets.cache differ diff --git a/MyMainMenu/obj/Release/MyMainMenu.csproj.AssemblyReference.cache b/MyMainMenu/obj/Release/MyMainMenu.csproj.AssemblyReference.cache new file mode 100644 index 0000000..b0ac304 Binary files /dev/null and b/MyMainMenu/obj/Release/MyMainMenu.csproj.AssemblyReference.cache differ diff --git a/MyMainMenu/obj/Release/MyMainMenu.csproj.CoreCompileInputs.cache b/MyMainMenu/obj/Release/MyMainMenu.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..04a8f40 --- /dev/null +++ b/MyMainMenu/obj/Release/MyMainMenu.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +744bd96403f4872d2e8276a6d2820746941939c618dff3317b8abe5c93d2d407 diff --git a/MyMainMenu/obj/Release/MyMainMenu.csproj.FileListAbsolute.txt b/MyMainMenu/obj/Release/MyMainMenu.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e60588f --- /dev/null +++ b/MyMainMenu/obj/Release/MyMainMenu.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\steam\steamapps\common\Escape from Duckov\Duckov_Data\Mods\MyMainMenu\MyMainMenu.dll +D:\vs_project\DuckovMods\MyMainMenu\obj\Release\MyMainMenu.csproj.AssemblyReference.cache +D:\vs_project\DuckovMods\MyMainMenu\obj\Release\MyMainMenu.GeneratedMSBuildEditorConfig.editorconfig +D:\vs_project\DuckovMods\MyMainMenu\obj\Release\MyMainMenu.AssemblyInfoInputs.cache +D:\vs_project\DuckovMods\MyMainMenu\obj\Release\MyMainMenu.AssemblyInfo.cs +D:\vs_project\DuckovMods\MyMainMenu\obj\Release\MyMainMenu.csproj.CoreCompileInputs.cache +D:\vs_project\DuckovMods\MyMainMenu\obj\Release\MyMainMenu.dll diff --git a/MyMainMenu/obj/Release/MyMainMenu.dll b/MyMainMenu/obj/Release/MyMainMenu.dll new file mode 100644 index 0000000..38f9c8d Binary files /dev/null and b/MyMainMenu/obj/Release/MyMainMenu.dll differ diff --git a/MyMainMenu/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs b/MyMainMenu/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs new file mode 100644 index 0000000..348b87f --- /dev/null +++ b/MyMainMenu/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/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.AssemblyInfo.cs b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.AssemblyInfo.cs new file mode 100644 index 0000000..00892cd --- /dev/null +++ b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.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("MyMainMenu")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")] +[assembly: System.Reflection.AssemblyProductAttribute("MyMainMenu")] +[assembly: System.Reflection.AssemblyTitleAttribute("MyMainMenu")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// 由 MSBuild WriteCodeFragment 类生成。 + diff --git a/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.AssemblyInfoInputs.cache b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.AssemblyInfoInputs.cache new file mode 100644 index 0000000..44c4bfa --- /dev/null +++ b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +b3ef56f4757a02383188b14d0c23f7bbd423d41a4f4cba0a12acb8688e7f7494 diff --git a/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.GeneratedMSBuildEditorConfig.editorconfig b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..19ccc75 --- /dev/null +++ b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,8 @@ +is_global = true +build_property.RootNamespace = MyMainMenu +build_property.ProjectDir = D:\vs_project\DuckovMods\MyMainMenu\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.CsWinRTUseWindowsUIXamlProjections = false +build_property.EffectiveAnalysisLevelStyle = +build_property.EnableCodeStyleSeverity = diff --git a/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.assets.cache b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.assets.cache new file mode 100644 index 0000000..bda881d Binary files /dev/null and b/MyMainMenu/obj/Release/netstandard2.1/MyMainMenu.assets.cache differ diff --git a/MyMainMenu/obj/project.assets.json b/MyMainMenu/obj/project.assets.json new file mode 100644 index 0000000..356b386 --- /dev/null +++ b/MyMainMenu/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\\MyMainMenu\\MyMainMenu.csproj", + "projectName": "MyMainMenu", + "projectPath": "D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.csproj", + "packagesPath": "C:\\Users\\Lenovo\\.nuget\\packages\\", + "outputPath": "D:\\vs_project\\DuckovMods\\MyMainMenu\\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/MyMainMenu/obj/project.nuget.cache b/MyMainMenu/obj/project.nuget.cache new file mode 100644 index 0000000..f892c5a --- /dev/null +++ b/MyMainMenu/obj/project.nuget.cache @@ -0,0 +1,12 @@ +{ + "version": 2, + "dgSpecHash": "/bMBU9IYEbw=", + "success": true, + "projectFilePath": "D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.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/MyMainMenu/obj/project.packagespec.json b/MyMainMenu/obj/project.packagespec.json new file mode 100644 index 0000000..6f00eed --- /dev/null +++ b/MyMainMenu/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.csproj","projectName":"MyMainMenu","projectPath":"D:\\vs_project\\DuckovMods\\MyMainMenu\\MyMainMenu.csproj","outputPath":"D:\\vs_project\\DuckovMods\\MyMainMenu\\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/MyMainMenu/obj/rider.project.model.nuget.info b/MyMainMenu/obj/rider.project.model.nuget.info new file mode 100644 index 0000000..5257283 --- /dev/null +++ b/MyMainMenu/obj/rider.project.model.nuget.info @@ -0,0 +1 @@ +17623501729185691 \ No newline at end of file diff --git a/MyMainMenu/obj/rider.project.restore.info b/MyMainMenu/obj/rider.project.restore.info new file mode 100644 index 0000000..5257283 --- /dev/null +++ b/MyMainMenu/obj/rider.project.restore.info @@ -0,0 +1 @@ +17623501729185691 \ No newline at end of file diff --git a/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfo.cs b/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfo.cs index 0b997b0..c0e3e31 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+0206a83f56b5a794fe2f173b4a047cc4f0d4cd90")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")] [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 fbe10b7..c2e6df2 100644 --- a/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfoInputs.cache +++ b/SceneSnapshot/obj/Debug/SceneSnapshot.AssemblyInfoInputs.cache @@ -1 +1 @@ -76527c0524d74c181c8c103eb804bb9ea72920abff0b6da2de1250e7811cd906 +d0b14bb5a2fe44e4165960f86b2001d300338f5655dddb8b391c1544fb8fcca4 diff --git a/SceneSnapshot/obj/Debug/SceneSnapshot.csproj.AssemblyReference.cache b/SceneSnapshot/obj/Debug/SceneSnapshot.csproj.AssemblyReference.cache index e17280e..4c29623 100644 Binary files a/SceneSnapshot/obj/Debug/SceneSnapshot.csproj.AssemblyReference.cache and b/SceneSnapshot/obj/Debug/SceneSnapshot.csproj.AssemblyReference.cache differ diff --git a/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfo.cs b/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfo.cs index 0c828c0..5dc9bfb 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+5d69efbc3f80a5422cef0884e02fb27adf20b467")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+786025f720c05ae486c8c66d3a6114633ccd0dbf")] [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 527661e..0b5a2ab 100644 --- a/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfoInputs.cache +++ b/SceneSnapshot/obj/Release/SceneSnapshot.AssemblyInfoInputs.cache @@ -1 +1 @@ -4cb78221af3251625ca99f740da024b47f366123d3acdfd330074e35f359044e +0377007546f92d23941a0c0e6a0cef8c6022db4ce07a6a7b98556714f9c594f1 diff --git a/SceneSnapshot/obj/Release/SceneSnapshot.csproj.AssemblyReference.cache b/SceneSnapshot/obj/Release/SceneSnapshot.csproj.AssemblyReference.cache index e17280e..4c29623 100644 Binary files a/SceneSnapshot/obj/Release/SceneSnapshot.csproj.AssemblyReference.cache and b/SceneSnapshot/obj/Release/SceneSnapshot.csproj.AssemblyReference.cache differ diff --git a/SceneSnapshot/obj/rider.project.model.nuget.info b/SceneSnapshot/obj/rider.project.model.nuget.info index 31df8f7..ea4a121 100644 --- a/SceneSnapshot/obj/rider.project.model.nuget.info +++ b/SceneSnapshot/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17619862901687226 \ No newline at end of file +17623343068138064 \ No newline at end of file diff --git a/SceneView/CanvasControl.cs b/SceneView/CanvasControl.cs new file mode 100644 index 0000000..5dc5f27 --- /dev/null +++ b/SceneView/CanvasControl.cs @@ -0,0 +1,60 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace SceneView +{ + public class CanvasControl : MonoBehaviour + { + public SceneViewPanel? sceneViewPanel; + + public static Vector2 panelSize = new Vector2(500, 800); + + public const string ViewCanvasName = "_SceneViewCanvas"; + public const string ShowAim = "LOGO"; + + private void Start() + { + InitCanvas(); + } + + public void Update() + { + if (Input.GetKeyDown(KeyCode.F2)) + { + Debug.Log("切换"); + sceneViewPanel.gameObject.SetActive(!sceneViewPanel.gameObject.activeSelf); + if (sceneViewPanel.gameObject.activeSelf) + { + sceneViewPanel.Refresh(); + } + } + } + + private void InitCanvas() + { + var canvasObj = new GameObject(ViewCanvasName); + var canvas = canvasObj.AddComponent(); + canvas.renderMode = RenderMode.ScreenSpaceOverlay; + canvas.sortingOrder = 1000; + canvasObj.AddComponent(); + canvasObj.AddComponent(); + DontDestroyOnLoad(canvasObj); + + sceneViewPanel=CreateSceneViewPanel(canvasObj.transform); + } + public static SceneViewPanel CreateSceneViewPanel(Transform parent) + { + var panelObj = new GameObject("SceneViewPanel"); + panelObj.transform.SetParent(parent, false); + var sceneViewPanel = panelObj.AddComponent(); + var panelImage = panelObj.AddComponent(); + panelImage.color = new Color(0.5f, 0.5f, 0.5f, 0.3f); + + var rectTransform = panelObj.GetComponent(); + rectTransform.sizeDelta = panelSize; + + return sceneViewPanel; + } + } +} \ No newline at end of file diff --git a/SceneView/ControlUtilities.cs b/SceneView/ControlUtilities.cs new file mode 100644 index 0000000..d3ebae8 --- /dev/null +++ b/SceneView/ControlUtilities.cs @@ -0,0 +1,432 @@ +using System; +using TMPro; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.UI; + +namespace SceneView +{ + [Serializable] + public struct RectTransformConfig + { + public Vector2 AnchorMin; + public Vector2 AnchorMax; + public Vector2 AnchoredPosition; + public Vector2 SizeDelta; + public Vector2 OffsetMin; + public Vector2 OffsetMax; + public Vector2 Pivot; + + // 默认配置 + 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) // 默认居中轴心点 + ); + + public RectTransformConfig( + Vector2 anchorMin, + Vector2 anchorMax, + Vector2 anchoredPosition, + Vector2 sizeDelta, + Vector2 offsetMin, + Vector2 offsetMax, + Vector2 pivot) + { + AnchorMin = anchorMin; + AnchorMax = anchorMax; + AnchoredPosition = anchoredPosition; + SizeDelta = sizeDelta; + OffsetMin = offsetMin; + OffsetMax = offsetMax; + Pivot = pivot; + } + } + + [Serializable] + public struct ButtonConfig + { + public RectTransformConfig RectConfig; + public Color BackgroundColor; + public string Text; + public int FontSize; + public Color TextColor; + 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 + ); + + public ButtonConfig( + RectTransformConfig rectConfig, + Color backgroundColor, + string text, + int fontSize, + Color textColor, + bool raycastTarget = true) + { + RectConfig = rectConfig; + BackgroundColor = backgroundColor; + Text = text; + FontSize = fontSize; + TextColor = textColor; + RaycastTarget = raycastTarget; + } + } + + [Serializable] + public struct TextConfig + { + public RectTransformConfig RectConfig; + public string Text; + public int FontSize; + public Color TextColor; + public TextAlignmentOptions Alignment; + public bool RaycastTarget; + + public static readonly TextConfig Default = new TextConfig( + rectConfig: RectTransformConfig.Default, + text: "New Text", + fontSize: 18, + textColor: Color.white, + alignment: TextAlignmentOptions.Center, + raycastTarget: false + ); + + public TextConfig( + string text, + int fontSize, + Color textColor, + TextAlignmentOptions alignment, + bool raycastTarget, + RectTransformConfig rectConfig) + { + RectConfig = rectConfig; + Text = text; + FontSize = fontSize; + TextColor = textColor; + Alignment = alignment; + RaycastTarget = raycastTarget; + } + } + + [Serializable] + public struct ScrollViewConfig + { + public Vector2 SizeDelta; // ScrollView 的尺寸 + public bool Vertical; + public bool Horizontal; + public Color BackgroundColor; + public Vector2 ContentPadding; // 内容区域的内边距(上下左右) + + public static readonly ScrollViewConfig Default = new ScrollViewConfig + { + SizeDelta = new Vector2(400, 300), + Vertical = true, + Horizontal = false, + BackgroundColor = new Color(0.1f, 0.1f, 0.1f, 0.8f), + ContentPadding = new Vector2(10, 10) // (horizontal, vertical) + }; + } + + [Serializable] + public struct InputFieldConfig + { + public RectTransformConfig RectConfig; + public Color BackgroundColor; + public string PlaceholderText; + public int PlaceholderFontSize; + public Color PlaceholderTextColor; + public Color TextColor; + public int FontSize; + 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 + ); + public InputFieldConfig( + RectTransformConfig rectConfig, + Color backgroundColor, + string placeholderText, + int placeholderFontSize, + Color placeholderTextColor, + Color textColor, + int fontSize, + TextAlignmentOptions textAlignment, + TMP_InputField.CharacterValidation characterValidation = TMP_InputField.CharacterValidation.None, + int characterLimit = 0) + { + RectConfig = rectConfig; + BackgroundColor = backgroundColor; + PlaceholderText = placeholderText; + PlaceholderFontSize = placeholderFontSize; + PlaceholderTextColor = placeholderTextColor; + TextColor = textColor; + FontSize = fontSize; + TextAlignment = textAlignment; + CharacterValidation = characterValidation; + CharacterLimit = characterLimit; + } + } + + public static class ControlUtilities + { + // 通用方法:将 RectTransformConfig 应用于 RectTransform + private static void ApplyRectTransformConfig(RectTransform rectTransform, RectTransformConfig config) + { + rectTransform.anchorMin = config.AnchorMin; + rectTransform.anchorMax = config.AnchorMax; + rectTransform.pivot = config.Pivot; + + var isStretched = config.SizeDelta == Vector2.zero; + + if (isStretched) + { + rectTransform.offsetMin = config.OffsetMin; + rectTransform.offsetMax = config.OffsetMax; + } + else + { + rectTransform.anchoredPosition = config.AnchoredPosition; + rectTransform.sizeDelta = config.SizeDelta; + } + } + + // ======================== + // 按钮创建 + // ======================== + 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); + + ApplyRectTransformConfig(btnRect, config.RectConfig); + + var button = btnObj.AddComponent