diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..ddb6ff85a --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..da60e25ae --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Unity", + "type": "vstuc", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..51dc03a0e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,70 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/.git": true, + "**/.vs": true, + "**/.gitmodules": true, + "**/.vsconfig": true, + "**/*.booproj": true, + "**/*.pidb": true, + "**/*.suo": true, + "**/*.user": true, + "**/*.userprefs": true, + "**/*.unityproj": true, + "**/*.dll": true, + "**/*.exe": true, + "**/*.pdf": true, + "**/*.mid": true, + "**/*.midi": true, + "**/*.wav": true, + "**/*.gif": true, + "**/*.ico": true, + "**/*.jpg": true, + "**/*.jpeg": true, + "**/*.png": true, + "**/*.psd": true, + "**/*.tga": true, + "**/*.tif": true, + "**/*.tiff": true, + "**/*.3ds": true, + "**/*.3DS": true, + "**/*.fbx": true, + "**/*.FBX": true, + "**/*.lxo": true, + "**/*.LXO": true, + "**/*.ma": true, + "**/*.MA": true, + "**/*.obj": true, + "**/*.OBJ": true, + "**/*.asset": true, + "**/*.cubemap": true, + "**/*.flare": true, + "**/*.mat": true, + "**/*.meta": true, + "**/*.prefab": true, + "**/*.unity": true, + "build/": true, + "Build/": true, + "Library/": true, + "library/": true, + "obj/": true, + "Obj/": true, + "Logs/": true, + "logs/": true, + "ProjectSettings/": true, + "UserSettings/": true, + "temp/": true, + "Temp/": true + }, + "files.associations": { + "*.asset": "yaml", + "*.meta": "yaml", + "*.prefab": "yaml", + "*.unity": "yaml", + }, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.sln": "*.csproj", + }, + "dotnet.defaultSolution": "Fishing2.sln" +} \ No newline at end of file diff --git a/Assets/Honeti/MorpheusGUI/Scenes/DemoScene.unity b/Assets/Honeti/MorpheusGUI/Scenes/DemoScene.unity index e2dfc2d5f..55bcc91ce 100644 --- a/Assets/Honeti/MorpheusGUI/Scenes/DemoScene.unity +++ b/Assets/Honeti/MorpheusGUI/Scenes/DemoScene.unity @@ -7490,7 +7490,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -60.000122} + m_AnchoredPosition: {x: 0, y: -60} m_SizeDelta: {x: 70, y: -120} m_Pivot: {x: 1, y: 1} --- !u!114 &56942380 @@ -84095,7 +84095,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -60} + m_AnchoredPosition: {x: 0, y: -60.000244} m_SizeDelta: {x: 20, y: -120} m_Pivot: {x: 1, y: 1} --- !u!114 &744733221 @@ -134448,7 +134448,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -60} + m_AnchoredPosition: {x: 0, y: -60.000244} m_SizeDelta: {x: 20, y: -120} m_Pivot: {x: 1, y: 1} --- !u!114 &1162464619 @@ -227071,6 +227071,50 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &1950491582 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1950491584} + - component: {fileID: 1950491583} + m_Layer: 0 + m_Name: ScreenshotCapturer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1950491583 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1950491582} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0c9b2dc114877d3479675dbe81e42739, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1950491584 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1950491582} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 555.19385, y: 829.94635, z: -225.59857} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1951076298 GameObject: m_ObjectHideFlags: 0 @@ -257611,3 +257655,4 @@ SceneRoots: - {fileID: 519420032} - {fileID: 2059699478} - {fileID: 1278188414} + - {fileID: 1950491584} diff --git a/Assets/Scripts/Utils/ScreenshotCapturer.cs b/Assets/Scripts/Utils/ScreenshotCapturer.cs new file mode 100644 index 000000000..b9915a49b --- /dev/null +++ b/Assets/Scripts/Utils/ScreenshotCapturer.cs @@ -0,0 +1,53 @@ + +using UnityEditor; +using UnityEngine; +using System.IO; + +public class ScreenshotCapturer : MonoBehaviour +{ + #if UNITY_EDITOR + private void Update() + { + + if (Input.GetKeyDown(KeyCode.F12)) + { + CaptureScreenshot(); + } + + } + + private void CaptureScreenshot() + { + // 获取Assets上一级目录路径 + string projectPath = Directory.GetParent(Application.dataPath).FullName; + string screenshotDir = Path.Combine(projectPath, "Screenshots"); + + // 如果目录不存在则创建 + if (!Directory.Exists(screenshotDir)) + { + Directory.CreateDirectory(screenshotDir); + } + + // 生成基于时间的文件名 + string timestamp = System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"); + string filename = $"Screenshot_{timestamp}.png"; + string fullPath = Path.Combine(screenshotDir, filename); + + // 确保文件名唯一 + int counter = 1; + while (File.Exists(fullPath)) + { + filename = $"Screenshot_{timestamp}_{counter}.png"; + fullPath = Path.Combine(screenshotDir, filename); + counter++; + } + + // 截取屏幕 + ScreenCapture.CaptureScreenshot(fullPath); + Debug.Log($"Screenshot saved to: {fullPath}"); + + // 刷新资源数据库(如果需要) + AssetDatabase.Refresh(); + } + #endif +} diff --git a/Assets/Scripts/Utils/ScreenshotCapturer.cs.meta b/Assets/Scripts/Utils/ScreenshotCapturer.cs.meta new file mode 100644 index 000000000..f703669b9 --- /dev/null +++ b/Assets/Scripts/Utils/ScreenshotCapturer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 0c9b2dc114877d3479675dbe81e42739 \ No newline at end of file diff --git a/FGUIProject/assets/Common/Com/Menu/BottomMenu.xml b/FGUIProject/assets/Common/Com/Menu/BottomMenu.xml index cf638a209..cd9369062 100644 --- a/FGUIProject/assets/Common/Com/Menu/BottomMenu.xml +++ b/FGUIProject/assets/Common/Com/Menu/BottomMenu.xml @@ -1,15 +1,15 @@ - + - - + + - - + + diff --git a/FGUIProject/assets/Common/Com/Menu/ButtonTab.xml b/FGUIProject/assets/Common/Com/Menu/ButtonTab.xml index c22b84d5e..b9a19796f 100644 --- a/FGUIProject/assets/Common/Com/Menu/ButtonTab.xml +++ b/FGUIProject/assets/Common/Com/Menu/ButtonTab.xml @@ -1,12 +1,12 @@ - - + + - + - + diff --git a/FGUIProject/assets/Common/Com/Menu/CommonMenu.xml b/FGUIProject/assets/Common/Com/Menu/CommonMenu.xml index b7fd60fb7..11776b572 100644 --- a/FGUIProject/assets/Common/Com/Menu/CommonMenu.xml +++ b/FGUIProject/assets/Common/Com/Menu/CommonMenu.xml @@ -1,19 +1,21 @@ + - - + + + diff --git a/FGUIProject/assets/Common/Com/Slider/CommonSlider.xml b/FGUIProject/assets/Common/Com/Slider/CommonSlider.xml new file mode 100644 index 000000000..47ab18aa9 --- /dev/null +++ b/FGUIProject/assets/Common/Com/Slider/CommonSlider.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/FGUIProject/assets/Common/Com/Slider/Slider1_grip.xml b/FGUIProject/assets/Common/Com/Slider/Slider1_grip.xml new file mode 100644 index 000000000..643c4ee4f --- /dev/null +++ b/FGUIProject/assets/Common/Com/Slider/Slider1_grip.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + +