diff --git a/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2 b/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2 index 4d98ac6..7ebfda1 100644 --- a/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2 +++ b/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2 @@ -11,91 +11,91 @@ SpriteAtlasAsset: m_MasterAtlas: {fileID: 0} m_ImporterData: packables: - - {fileID: 21300000, guid: f9a0616831825894485c16a2ac08a7e0, type: 3} - - {fileID: 21300000, guid: fa9c1f5a0bd828a49974be032fb75f53, type: 3} - - {fileID: 21300000, guid: 7f19a8cd463a4704194fa0155f1a2dfe, type: 3} - - {fileID: 21300000, guid: 18be04495a5b32d44a5e023b96256fdf, type: 3} - - {fileID: 21300000, guid: 27b1070c36bd9e84f8dbceff02004fec, type: 3} - - {fileID: 21300000, guid: 5e7003925033853438585b937fc3f6ff, type: 3} - - {fileID: 21300000, guid: 5ff8d85e750d8544dbd09bfd87a6d547, type: 3} - - {fileID: 21300000, guid: 175eb033ed0c4b84d98f531b29175fec, type: 3} - - {fileID: 21300000, guid: 607631c933ffd2f47a2378b79f76e5bb, type: 3} - - {fileID: 21300000, guid: 913e9044f6df7f646bcda3e74b4acac3, type: 3} - - {fileID: 21300000, guid: cba07afea1014e34182660aebf39abdf, type: 3} - - {fileID: 21300000, guid: f832746edeeecf141a7d907c2381e9e0, type: 3} - - {fileID: 21300000, guid: d4e414f0197fdb14f9f1c5cc1c1f22ab, type: 3} - - {fileID: 21300000, guid: e56040b5c4abc1046851d912f4004f2b, type: 3} - - {fileID: 21300000, guid: a2ff094edec89cf499ce95b80e93359a, type: 3} - - {fileID: 21300000, guid: ee39da6dc1ff1104e8dfb17bb32204b4, type: 3} - - {fileID: 21300000, guid: 207de470efbbbd14a959ac3b2b4af1d9, type: 3} - - {fileID: 21300000, guid: 726767a62ca4f69479f67bb224ad8d68, type: 3} - - {fileID: 21300000, guid: c69f306c0e64ed548a06af8c9f49c519, type: 3} - - {fileID: 21300000, guid: 6809f2449ef6774469571faf4a335e45, type: 3} - - {fileID: 21300000, guid: 954a5c14b2c505f43beb4f2393a5d965, type: 3} - - {fileID: 21300000, guid: 4c1f6761c3255fb46a6d467ccde4f746, type: 3} - - {fileID: 21300000, guid: 497802daf8a87374da0b112ce0dc8275, type: 3} - - {fileID: 21300000, guid: 8ab818cb19c9a694782c71cfd19c828b, type: 3} - - {fileID: 21300000, guid: 8f32e590b1396324fb932e4625e05c85, type: 3} - - {fileID: 21300000, guid: 68dc6183919b51f4ca0905240924f248, type: 3} - - {fileID: 21300000, guid: a828b047d5f21b04cbdd08d8285abd2a, type: 3} - - {fileID: 21300000, guid: bf0a16a0d8eff9c40aea344b528e24fa, type: 3} - - {fileID: 21300000, guid: cc62386d42a5b8143934e45e2dd2d42f, type: 3} - - {fileID: 21300000, guid: 1ea3699016ca47249bdfcf34ab236815, type: 3} - - {fileID: 21300000, guid: 2bc24c7b22b5a4d4290eaa702a6b0ad7, type: 3} - - {fileID: 21300000, guid: de1d8b3092af98c4e9792756a4d2f049, type: 3} - - {fileID: 21300000, guid: 02363c215137bdb42aa5ecbe4e6d8d8c, type: 3} - - {fileID: 21300000, guid: e7c198240c1bad340b7772546cacf421, type: 3} - - {fileID: 21300000, guid: 348ca331739e02c4d996bd2834298dd6, type: 3} - - {fileID: 21300000, guid: 409947b7a8172574f8894b7f218478b6, type: 3} - - {fileID: 21300000, guid: 0ed14168c05069841b14ddd6decdb900, type: 3} - - {fileID: 21300000, guid: 0c1dc1f99c7844749b11caa8b39d8b4e, type: 3} - - {fileID: 21300000, guid: 6afcbee2bc0808f428fe3397d6dc42fa, type: 3} - - {fileID: 21300000, guid: 87fab78b737a92346bc1fc963a5db45d, type: 3} - - {fileID: 21300000, guid: 7972fefc93fd66444827e42cc96634c6, type: 3} - - {fileID: 21300000, guid: 6d0b106c0ebb73b408da135fe36d1401, type: 3} - - {fileID: 21300000, guid: 1f5d608380f3df54ca5cacc7d5c35d34, type: 3} - - {fileID: 21300000, guid: 1615ba88e238016459b3b9261f4a23be, type: 3} - - {fileID: 21300000, guid: 43d8f9b4b4fd2354ab1b1a37ec2a0835, type: 3} - - {fileID: 21300000, guid: b0795a45b06c4814a92ad8fa72327321, type: 3} - - {fileID: 21300000, guid: 118bd4b892826964493c8be5a905a766, type: 3} - - {fileID: 21300000, guid: b7a1cbfec9985a746bc3cfb081e780d2, type: 3} - - {fileID: 21300000, guid: f572b08953884cc4c9f3f1b122f2b980, type: 3} - - {fileID: 21300000, guid: 8235eefc38f3caf49aef5540033cbefc, type: 3} - - {fileID: 21300000, guid: be721820470290342aa5d36cdab0385c, type: 3} - - {fileID: 21300000, guid: c1d729a7db669024cbab022aa80edf21, type: 3} - - {fileID: 21300000, guid: 129202cda1248f24b8abe918c9c72f06, type: 3} - - {fileID: 21300000, guid: 8a8e7b277beaaaf45973aba3d5db041e, type: 3} - - {fileID: 21300000, guid: 1fb9ba7be3bd78d4d8f92defbaf20658, type: 3} - - {fileID: 21300000, guid: b30ad2e932f7f3d408b8c1815e2ab2bd, type: 3} - - {fileID: 21300000, guid: f1f4bd8bbce68cc4f9cdaf5019440d51, type: 3} - - {fileID: 21300000, guid: dead25ee2e0535748be6f42c97c50afc, type: 3} - - {fileID: 21300000, guid: d3d86a4b3f94ba94aa9ee76bbcab6453, type: 3} - - {fileID: 21300000, guid: fd494f650c0d03b47b69996d7364eb75, type: 3} - {fileID: 21300000, guid: 144abc3890e516748aa52331705bd3b5, type: 3} - - {fileID: 21300000, guid: 0d87c0aa00237734da08f058ae9c8c14, type: 3} - - {fileID: 21300000, guid: 78f378447785d1349b27225f96fdc505, type: 3} - - {fileID: 21300000, guid: 7869740bf9c7e804aa4e48248c218348, type: 3} - - {fileID: 21300000, guid: c86dc12695fb566468d62e3729ee9ef2, type: 3} - - {fileID: 21300000, guid: 84f20a357f00204409e1f70710267f28, type: 3} - - {fileID: 21300000, guid: baddbc879a995fb47ac2220003dd9e91, type: 3} - - {fileID: 21300000, guid: 9d54f507682aaf248a51d3149bdea388, type: 3} - - {fileID: 21300000, guid: ac368b136f165584f92a1086db53dc27, type: 3} - - {fileID: 21300000, guid: 71923c055d598bb42b9c6476ba88c34e, type: 3} - - {fileID: 21300000, guid: b861989be892249489863e86567d03a2, type: 3} - - {fileID: 21300000, guid: 7e2e22e7ab6afd04fa90f6ad4630cb32, type: 3} - - {fileID: 21300000, guid: dd3f4ec164d520741a42f1a55dd35ab1, type: 3} - {fileID: 21300000, guid: 4b27ab58cc02a8f468cf32e5f9a6f511, type: 3} - - {fileID: 21300000, guid: 8cfeb7e0053f8c64894326e715e3ab17, type: 3} - - {fileID: 21300000, guid: f613fab028d7cf8469ed37a4909c0947, type: 3} - - {fileID: 21300000, guid: a1eea4a65a538784d895a6f92447e3bb, type: 3} - - {fileID: 21300000, guid: cf319f80f8bdf904aa00ab53bd4c9040, type: 3} - - {fileID: 21300000, guid: 7f93f7d8b5c83d040a890c22063d1fe1, type: 3} - - {fileID: 21300000, guid: 948a0ae253c48d54c930188e3ab241e7, type: 3} - {fileID: 21300000, guid: ecbc50ead194f7a4fb95266b47c6bf79, type: 3} - - {fileID: 21300000, guid: d2983e0e76a3d06489a7c3e089e1de22, type: 3} - - {fileID: 21300000, guid: 161b54a2b92c1744db4d578ae5696ebb, type: 3} - - {fileID: 21300000, guid: baaa99d5f81536e49b207e46fac3ce30, type: 3} + - {fileID: 21300000, guid: f1f4bd8bbce68cc4f9cdaf5019440d51, type: 3} + - {fileID: 21300000, guid: f613fab028d7cf8469ed37a4909c0947, type: 3} + - {fileID: 21300000, guid: dead25ee2e0535748be6f42c97c50afc, type: 3} + - {fileID: 21300000, guid: 1615ba88e238016459b3b9261f4a23be, type: 3} + - {fileID: 21300000, guid: cc62386d42a5b8143934e45e2dd2d42f, type: 3} + - {fileID: 21300000, guid: b7a1cbfec9985a746bc3cfb081e780d2, type: 3} + - {fileID: 21300000, guid: baddbc879a995fb47ac2220003dd9e91, type: 3} - {fileID: 21300000, guid: 7bf05f80deecf2f43914ec6bb8749439, type: 3} + - {fileID: 21300000, guid: 409947b7a8172574f8894b7f218478b6, type: 3} + - {fileID: 21300000, guid: baaa99d5f81536e49b207e46fac3ce30, type: 3} + - {fileID: 21300000, guid: 207de470efbbbd14a959ac3b2b4af1d9, type: 3} + - {fileID: 21300000, guid: c1d729a7db669024cbab022aa80edf21, type: 3} + - {fileID: 21300000, guid: ee39da6dc1ff1104e8dfb17bb32204b4, type: 3} + - {fileID: 21300000, guid: d4e414f0197fdb14f9f1c5cc1c1f22ab, type: 3} + - {fileID: 21300000, guid: 4c1f6761c3255fb46a6d467ccde4f746, type: 3} + - {fileID: 21300000, guid: 5e7003925033853438585b937fc3f6ff, type: 3} + - {fileID: 21300000, guid: f9a0616831825894485c16a2ac08a7e0, type: 3} + - {fileID: 21300000, guid: 1ea3699016ca47249bdfcf34ab236815, type: 3} + - {fileID: 21300000, guid: ac368b136f165584f92a1086db53dc27, type: 3} + - {fileID: 21300000, guid: 1f5d608380f3df54ca5cacc7d5c35d34, type: 3} + - {fileID: 21300000, guid: 8a8e7b277beaaaf45973aba3d5db041e, type: 3} + - {fileID: 21300000, guid: 913e9044f6df7f646bcda3e74b4acac3, type: 3} + - {fileID: 21300000, guid: a1eea4a65a538784d895a6f92447e3bb, type: 3} - {fileID: 21300000, guid: a9a0f00a04da2784baa9dc0fea583357, type: 3} + - {fileID: 21300000, guid: 118bd4b892826964493c8be5a905a766, type: 3} + - {fileID: 21300000, guid: b0795a45b06c4814a92ad8fa72327321, type: 3} + - {fileID: 21300000, guid: 607631c933ffd2f47a2378b79f76e5bb, type: 3} + - {fileID: 21300000, guid: f832746edeeecf141a7d907c2381e9e0, type: 3} + - {fileID: 21300000, guid: cf319f80f8bdf904aa00ab53bd4c9040, type: 3} + - {fileID: 21300000, guid: de1d8b3092af98c4e9792756a4d2f049, type: 3} + - {fileID: 21300000, guid: fd494f650c0d03b47b69996d7364eb75, type: 3} + - {fileID: 21300000, guid: cba07afea1014e34182660aebf39abdf, type: 3} + - {fileID: 21300000, guid: 5ff8d85e750d8544dbd09bfd87a6d547, type: 3} + - {fileID: 21300000, guid: 02363c215137bdb42aa5ecbe4e6d8d8c, type: 3} + - {fileID: 21300000, guid: 348ca331739e02c4d996bd2834298dd6, type: 3} + - {fileID: 21300000, guid: e7c198240c1bad340b7772546cacf421, type: 3} + - {fileID: 21300000, guid: 8ab818cb19c9a694782c71cfd19c828b, type: 3} + - {fileID: 21300000, guid: 7e2e22e7ab6afd04fa90f6ad4630cb32, type: 3} + - {fileID: 21300000, guid: c69f306c0e64ed548a06af8c9f49c519, type: 3} + - {fileID: 21300000, guid: bf0a16a0d8eff9c40aea344b528e24fa, type: 3} + - {fileID: 21300000, guid: 6809f2449ef6774469571faf4a335e45, type: 3} + - {fileID: 21300000, guid: 7f93f7d8b5c83d040a890c22063d1fe1, type: 3} + - {fileID: 21300000, guid: 8f32e590b1396324fb932e4625e05c85, type: 3} + - {fileID: 21300000, guid: 7f19a8cd463a4704194fa0155f1a2dfe, type: 3} + - {fileID: 21300000, guid: 0d87c0aa00237734da08f058ae9c8c14, type: 3} + - {fileID: 21300000, guid: 71923c055d598bb42b9c6476ba88c34e, type: 3} + - {fileID: 21300000, guid: 9d54f507682aaf248a51d3149bdea388, type: 3} + - {fileID: 21300000, guid: 8235eefc38f3caf49aef5540033cbefc, type: 3} + - {fileID: 21300000, guid: b30ad2e932f7f3d408b8c1815e2ab2bd, type: 3} + - {fileID: 21300000, guid: 78f378447785d1349b27225f96fdc505, type: 3} + - {fileID: 21300000, guid: a828b047d5f21b04cbdd08d8285abd2a, type: 3} + - {fileID: 21300000, guid: c86dc12695fb566468d62e3729ee9ef2, type: 3} + - {fileID: 21300000, guid: 129202cda1248f24b8abe918c9c72f06, type: 3} + - {fileID: 21300000, guid: 948a0ae253c48d54c930188e3ab241e7, type: 3} + - {fileID: 21300000, guid: 2bc24c7b22b5a4d4290eaa702a6b0ad7, type: 3} + - {fileID: 21300000, guid: 161b54a2b92c1744db4d578ae5696ebb, type: 3} + - {fileID: 21300000, guid: e56040b5c4abc1046851d912f4004f2b, type: 3} + - {fileID: 21300000, guid: be721820470290342aa5d36cdab0385c, type: 3} + - {fileID: 21300000, guid: 68dc6183919b51f4ca0905240924f248, type: 3} + - {fileID: 21300000, guid: 0c1dc1f99c7844749b11caa8b39d8b4e, type: 3} + - {fileID: 21300000, guid: fa9c1f5a0bd828a49974be032fb75f53, type: 3} + - {fileID: 21300000, guid: b861989be892249489863e86567d03a2, type: 3} + - {fileID: 21300000, guid: 497802daf8a87374da0b112ce0dc8275, type: 3} + - {fileID: 21300000, guid: f572b08953884cc4c9f3f1b122f2b980, type: 3} + - {fileID: 21300000, guid: 18be04495a5b32d44a5e023b96256fdf, type: 3} + - {fileID: 21300000, guid: 87fab78b737a92346bc1fc963a5db45d, type: 3} + - {fileID: 21300000, guid: 175eb033ed0c4b84d98f531b29175fec, type: 3} + - {fileID: 21300000, guid: 84f20a357f00204409e1f70710267f28, type: 3} + - {fileID: 21300000, guid: 726767a62ca4f69479f67bb224ad8d68, type: 3} + - {fileID: 21300000, guid: 8cfeb7e0053f8c64894326e715e3ab17, type: 3} + - {fileID: 21300000, guid: 6afcbee2bc0808f428fe3397d6dc42fa, type: 3} + - {fileID: 21300000, guid: 7972fefc93fd66444827e42cc96634c6, type: 3} + - {fileID: 21300000, guid: 27b1070c36bd9e84f8dbceff02004fec, type: 3} + - {fileID: 21300000, guid: d2983e0e76a3d06489a7c3e089e1de22, type: 3} + - {fileID: 21300000, guid: d3d86a4b3f94ba94aa9ee76bbcab6453, type: 3} + - {fileID: 21300000, guid: a2ff094edec89cf499ce95b80e93359a, type: 3} + - {fileID: 21300000, guid: 954a5c14b2c505f43beb4f2393a5d965, type: 3} + - {fileID: 21300000, guid: 0ed14168c05069841b14ddd6decdb900, type: 3} + - {fileID: 21300000, guid: dd3f4ec164d520741a42f1a55dd35ab1, type: 3} + - {fileID: 21300000, guid: 7869740bf9c7e804aa4e48248c218348, type: 3} + - {fileID: 21300000, guid: 43d8f9b4b4fd2354ab1b1a37ec2a0835, type: 3} + - {fileID: 21300000, guid: 1fb9ba7be3bd78d4d8f92defbaf20658, type: 3} + - {fileID: 21300000, guid: 6d0b106c0ebb73b408da135fe36d1401, type: 3} m_IsVariant: 0 m_ScriptablePacker: {fileID: 0} diff --git a/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2.meta b/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2.meta index ddc59eb..c23ae6c 100644 --- a/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2.meta +++ b/Client/Assets/Art/Atlas/Atlas_GuideIcon.spriteatlasv2.meta @@ -58,7 +58,7 @@ SpriteAtlasImporter: padding: 4 blockOffset: 1 allowAlphaSplitting: 0 - enableRotation: 1 + enableRotation: 0 enableTightPacking: 1 enableAlphaDilation: 1 secondaryTextureSettings: {} diff --git a/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2 b/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2 index 9269a44..8007baf 100644 --- a/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2 +++ b/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2 @@ -11,8 +11,8 @@ SpriteAtlasAsset: m_MasterAtlas: {fileID: 0} m_ImporterData: packables: - - {fileID: 21300000, guid: 0d6ea64d3c7f3034abff9bebe364db13, type: 3} - {fileID: 21300000, guid: f01b7a3fc0f4e824882239176818d72d, type: 3} + - {fileID: 21300000, guid: 0d6ea64d3c7f3034abff9bebe364db13, type: 3} - {fileID: 21300000, guid: 252e7aae10cf6c64e84fe81966b3fc8b, type: 3} - {fileID: 21300000, guid: c7f54aa88f902f24182d8259d502555a, type: 3} m_IsVariant: 0 diff --git a/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2.meta b/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2.meta index 533a3c2..4561b08 100644 --- a/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2.meta +++ b/Client/Assets/Art/Atlas/Atlas_GuideIcon_GuideIcon_Nonuse.spriteatlasv2.meta @@ -58,7 +58,7 @@ SpriteAtlasImporter: padding: 4 blockOffset: 1 allowAlphaSplitting: 0 - enableRotation: 1 + enableRotation: 0 enableTightPacking: 1 enableAlphaDilation: 1 secondaryTextureSettings: {} diff --git a/Client/Assets/Art/Atlas/Atlas_bg.spriteatlasv2.meta b/Client/Assets/Art/Atlas/Atlas_bg.spriteatlasv2.meta index fad2138..6c55106 100644 --- a/Client/Assets/Art/Atlas/Atlas_bg.spriteatlasv2.meta +++ b/Client/Assets/Art/Atlas/Atlas_bg.spriteatlasv2.meta @@ -58,7 +58,7 @@ SpriteAtlasImporter: padding: 4 blockOffset: 1 allowAlphaSplitting: 0 - enableRotation: 1 + enableRotation: 0 enableTightPacking: 1 enableAlphaDilation: 1 secondaryTextureSettings: {} diff --git a/Client/Assets/Art/Atlas/Atlas_icon.spriteatlasv2.meta b/Client/Assets/Art/Atlas/Atlas_icon.spriteatlasv2.meta index 4d5f3f6..419d0b8 100644 --- a/Client/Assets/Art/Atlas/Atlas_icon.spriteatlasv2.meta +++ b/Client/Assets/Art/Atlas/Atlas_icon.spriteatlasv2.meta @@ -58,7 +58,7 @@ SpriteAtlasImporter: padding: 4 blockOffset: 1 allowAlphaSplitting: 0 - enableRotation: 1 + enableRotation: 0 enableTightPacking: 1 enableAlphaDilation: 1 secondaryTextureSettings: {} diff --git a/Client/Assets/Scenes/Desingn.unity b/Client/Assets/Scenes/Desingn.unity index c9c205f..5e68aaf 100644 --- a/Client/Assets/Scenes/Desingn.unity +++ b/Client/Assets/Scenes/Desingn.unity @@ -240,6 +240,129 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &453805642 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 453805643} + - component: {fileID: 453805646} + - component: {fileID: 453805645} + - component: {fileID: 453805644} + m_Layer: 5 + m_Name: TestViewHolder (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &453805643 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 453805642} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2553447207363733383} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &453805644 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 453805642} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7e92b092d584bb39e5239463f064cbe, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Interactable: 0 + m_Mode: 1 + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TransitionData: + targetGraphic: {fileID: 453805645} + transition: 1 + colors: + m_NormalColor: {r: 0.9847498, g: 1, b: 0, a: 1} + m_HighlightedColor: {r: 0, g: 1, b: 0.12997723, a: 1} + m_PressedColor: {r: 1, g: 0, b: 0, a: 1} + m_SelectedColor: {r: 0.23380716, g: 0.033018887, b: 1, a: 1} + m_DisabledColor: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 0.5} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + spriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + animationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_ChildTransitions: [] + m_UXGroup: {fileID: 0} + hoverAudioClip: {fileID: 0} + clickAudioClip: {fileID: 0} + m_SelectionState: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &453805645 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 453805642} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &453805646 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 453805642} + m_CullTransparentMesh: 1 --- !u!1 &961739749 GameObject: m_ObjectHideFlags: 0 @@ -434,7 +557,7 @@ PrefabInstance: m_AddedGameObjects: - targetCorrespondingSourceObject: {fileID: 3110666966229274110, guid: 9368ff38b2090b2468f8358242026e4b, type: 3} insertIndex: -1 - addedObject: {fileID: 1625966373} + addedObject: {fileID: 2553447207363733383} m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 9368ff38b2090b2468f8358242026e4b, type: 3} --- !u!224 &1496268632 stripped @@ -442,116 +565,190 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 3110666966229274110, guid: 9368ff38b2090b2468f8358242026e4b, type: 3} m_PrefabInstance: {fileID: 1496268631} m_PrefabAsset: {fileID: 0} ---- !u!1001 &1625966372 -PrefabInstance: +--- !u!1 &526598952644250733 +GameObject: m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1496268632} - m_Modifications: - - target: {fileID: 526598954257632073, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_Name - value: UILoadUpdateWindow - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6405902671848519776, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: _scrollbar - value: - objectReference: {fileID: 0} - - target: {fileID: 6405902671848519776, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - propertyPath: _showScrollBar - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} ---- !u!224 &1625966373 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 2553447206821208227, guid: afd6d5cf3d694a848903fd7f4eecd3c6, type: 3} - m_PrefabInstance: {fileID: 1625966372} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2553447207363733383} + - component: {fileID: 4801502738679186807} + - component: {fileID: 1839643557661772062} + - component: {fileID: 3878109914955847118} + - component: {fileID: 4801502738679186808} + m_Layer: 5 + m_Name: UILoadUpdateWindow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &881789250601706820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5796037856364799285} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &1839643557661772062 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 526598952644250733} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 55 +--- !u!224 &2553447207363733383 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 526598952644250733} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4895621795333603157} + - {fileID: 453805643} + m_Father: {fileID: 1496268632} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3878109914955847118 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 526598952644250733} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 330876e70d2a63a46b715c69efd1c482, type: 3} + m_Name: + m_EditorClassIdentifier: + AnimationFlow: {fileID: 0} + mImgBackGround: {fileID: 881789250601706820} +--- !u!223 &4801502738679186807 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 526598952644250733} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 1 + m_AdditionalShaderChannelsFlag: -1 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &4801502738679186808 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 526598952644250733} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 505f6b3030031c24f994c1d4b93fbe20, type: 3} + m_Name: + m_EditorClassIdentifier: + btnTest: {fileID: 453805644} + selected: 0 +--- !u!224 &4895621795333603157 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5796037856364799285} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2553447207363733383} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &5796037856364799285 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4895621795333603157} + - component: {fileID: 8962701528096896734} + - component: {fileID: 881789250601706820} + m_Layer: 5 + m_Name: Img@BackGround + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!222 &8962701528096896734 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5796037856364799285} + m_CullTransparentMesh: 0 --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Client/Assets/Scripts/Hotfix/GameLogic/TestMono.cs b/Client/Assets/Scripts/Hotfix/GameLogic/TestMono.cs index a75dca1..faa6145 100644 --- a/Client/Assets/Scripts/Hotfix/GameLogic/TestMono.cs +++ b/Client/Assets/Scripts/Hotfix/GameLogic/TestMono.cs @@ -13,33 +13,9 @@ public class TestMono : MonoBehaviour private void OnGUI() { - if (GUILayout.Button("ShowUI10")) - { - Profiler.BeginSample("ShowUI10"); - GameApp.UI.ShowUI("UILoadUpdate", 10); - Profiler.EndSample(); - EditorApplication.isPaused = true; - } - - if (GUILayout.Button("ShowUI100")) - { - GameApp.UI.ShowUI(100); - } - - - if (GUILayout.Button("ShowUI1000")) - { - GameApp.UI.ShowUI(1000); - } - if (GUILayout.Button("HideUI")) { GameApp.UI.CloseUI(); } - - if (GUILayout.Button("Fire")) - { - // GameApp.Event.Fire(this, AssetPatchStatesChangeEventArgs.Create(EPatchStates.PatchDone)); - } } } diff --git a/Client/Assets/Scripts/Hotfix/GameLogic/UILoadUpdate.cs b/Client/Assets/Scripts/Hotfix/GameLogic/UILoadUpdate.cs index 4293244..7cbe301 100644 --- a/Client/Assets/Scripts/Hotfix/GameLogic/UILoadUpdate.cs +++ b/Client/Assets/Scripts/Hotfix/GameLogic/UILoadUpdate.cs @@ -12,67 +12,6 @@ using UnityEngine; [Window(UILayer.UI, false)] public class UILoadUpdate : UITabWindow { - private LoopAdapter typeAdapter; - private UITestCardWidget _uiTestCardWidget; - - protected override async UniTask OnInitializeAsync() - { - Log.Info("OnInitlize"); - typeAdapter = new LoopAdapter(baseui.ScrollViewTestList); - typeAdapter.SetOnItemClick(OnItemClick); - baseui.ScrollViewTestList.SetAdapter(typeAdapter); - baseui.ScrollViewTestList.OnIndexChanged += index => { Debug.Log("Index Changed"); }; - - baseui.ScrollViewTestList.OnMoveingChanged += () => { Debug.Log("Scroll Changed"); }; - } - - private void OnItemClick(string obj) - { - var index = 100 + ((typeAdapter.ChoiceIndex + 1) * 10) + typeAdapter.ChoiceIndex; - baseui.ScrollViewTestList.ScrollTo(index, true); - } - - protected override void OnRegisterEvent(EventListenerProxy proxy) - { - base.OnRegisterEvent(proxy); - // proxy.Subscribe(AssetPatchStatesChangeEventArgs.EventId, SetPatchStates); - } - - private void SetPatchStates(object sender, GameEventArgs e) - { - Debug.Log("收到信息"); - } - - protected override void OnOpen() - { - base.OnOpen(); - List para = new List(); - int count = 5; - for (var i = 0; i < count; i++) - { - para.Add(i.ToString()); - } - - typeAdapter.SetList(para); - baseui.ScrollViewTestList.ScrollTo(100 * typeAdapter.GetRealCount()); - } - - protected override void OnClose() - { - base.OnClose(); - Log.Info("OnClose"); - } - - protected override void OnDestroy() - { - base.OnDestroy(); - Log.Info("OnDestroy"); - } - - protected override void OnUpdate() - { - base.OnUpdate(); - } } diff --git a/Client/Assets/Scripts/Hotfix/GameLogic/ui_UILoadUpdateWindow.cs b/Client/Assets/Scripts/Hotfix/GameLogic/ui_UILoadUpdateWindow.cs index f80da89..15a5a6d 100644 --- a/Client/Assets/Scripts/Hotfix/GameLogic/ui_UILoadUpdateWindow.cs +++ b/Client/Assets/Scripts/Hotfix/GameLogic/ui_UILoadUpdateWindow.cs @@ -1,6 +1,5 @@ using UnityEngine; using UnityEngine.UI; -using AlicizaX.UI.RecyclerView; using Sirenix.OdinInspector; using AlicizaX.UI.Runtime; namespace GameLogic.UI @@ -17,18 +16,6 @@ namespace GameLogic.UI private Image mImgBackGround; public Image ImgBackGround => mImgBackGround; - [SerializeField] - [ReadOnly] - [HideLabel] - private RecyclerView mScrollViewTestList; - public RecyclerView ScrollViewTestList => mScrollViewTestList; - - [SerializeField] - [ReadOnly] - [HideLabel] - private Image mImgTestccc; - public Image ImgTestccc => mImgTestccc; - #endregion } diff --git a/Client/Assets/Test/GameLogic.dll.bytes b/Client/Assets/Test/GameLogic.dll.bytes index 8b8fdb9..1420c74 100644 Binary files a/Client/Assets/Test/GameLogic.dll.bytes and b/Client/Assets/Test/GameLogic.dll.bytes differ diff --git a/Client/Assets/Test/GameLogic.pdb.bytes b/Client/Assets/Test/GameLogic.pdb.bytes index fcc6e27..25428b1 100644 Binary files a/Client/Assets/Test/GameLogic.pdb.bytes and b/Client/Assets/Test/GameLogic.pdb.bytes differ diff --git a/Client/Assets/UITestMono.cs b/Client/Assets/UITestMono.cs new file mode 100644 index 0000000..7b94ea0 --- /dev/null +++ b/Client/Assets/UITestMono.cs @@ -0,0 +1,29 @@ +using UnityEngine; + +public class UITestMono : MonoBehaviour +{ + public UXButton btnTest; + public bool selected; + + [Sirenix.OdinInspector.Button] + public void DoSelect() + { + btnTest.SetSelect(selected, true); + } + + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + btnTest.onValueChanged.AddListener(OnvalueChanged); + } + + private void OnvalueChanged(bool arg0) + { + Debug.Log($"ValueChanged {arg0}"); + } + + // Update is called once per frame + void Update() + { + } +} diff --git a/Client/Assets/UITestMono.cs.meta b/Client/Assets/UITestMono.cs.meta new file mode 100644 index 0000000..098b164 --- /dev/null +++ b/Client/Assets/UITestMono.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 505f6b3030031c24f994c1d4b93fbe20 \ No newline at end of file diff --git a/Client/Assets/uielementconfig.txt b/Client/Assets/uielementconfig.txt new file mode 100644 index 0000000..d09f275 --- /dev/null +++ b/Client/Assets/uielementconfig.txt @@ -0,0 +1 @@ +[{"uiElementRegex":"Rect","componentType":"RectTransform"},{"uiElementRegex":"Obj","componentType":"GameObject"},{"uiElementRegex":"Tf","componentType":"Transform"},{"uiElementRegex":"Btn","componentType":"UXButton"},{"uiElementRegex":"Slider","componentType":"Slider"},{"uiElementRegex":"Img","componentType":"UXImage"},{"uiElementRegex":"RImg","componentType":"RawImage"},{"uiElementRegex":"Scrollbar","componentType":"Scrollbar"},{"uiElementRegex":"ScrollRect","componentType":"ScrollRect"},{"uiElementRegex":"GLayout","componentType":"GridLayoutGroup"},{"uiElementRegex":"HLayout","componentType":"HorizontalLayoutGroup"},{"uiElementRegex":"VLayout","componentType":"VerticalLayoutGroup"},{"uiElementRegex":"Text","componentType":"TMPro.TextMeshProUGUI"},{"uiElementRegex":"TogGroup","componentType":"UXGroup"},{"uiElementRegex":"Mask2D","componentType":"RectMask2D"},{"uiElementRegex":"Video","componentType":"Video.VideoPlayer"},{"uiElementRegex":"Input","componentType":"TMPro.TMP_InputField"},{"uiElementRegex":"CanvasGroup","componentType":"CanvasGroup"},{"uiElementRegex":"ScrollView","componentType":"RecyclerView"},{"uiElementRegex":"Drag","componentType":"UXDraggable"}] \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/LICENSE.md.meta b/Client/Assets/uielementconfig.txt.meta similarity index 75% rename from Client/Packages/com.alicizax.unity.ui.extension/LICENSE.md.meta rename to Client/Assets/uielementconfig.txt.meta index 7f95deb..763af47 100644 --- a/Client/Packages/com.alicizax.unity.ui.extension/LICENSE.md.meta +++ b/Client/Assets/uielementconfig.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1df2552bb1d632e4882a02c71379f0bb +guid: cd96f3d9dd2a90d40a81a1d4319ce8f2 TextScriptImporter: externalObjects: {} userData: diff --git a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioAgent.cs b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioAgent.cs index 579816f..f53c018 100644 --- a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioAgent.cs +++ b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioAgent.cs @@ -196,6 +196,40 @@ namespace AlicizaX.Audio.Runtime return audioAgent; } + public static AudioAgent Create(AudioClip clip, AudioCategory audioCategory) + { + AudioAgent audioAgent = new AudioAgent(); + audioAgent.Init(audioCategory); + audioAgent.SetAudioClip(clip); + return audioAgent; + } + + public void SetAudioClip(AudioClip clip) + { + if (_source == null) + return; + + Stop(false); + + if (_audioData != null) + { + AudioData.DeAlloc(_audioData); + _audioData = null; + } + + _source.clip = clip; + if (clip != null) + { + _source.Play(); + _audioAgentRuntimeState = AudioAgentRuntimeState.Playing; + _duration = 0; + } + else + { + _audioAgentRuntimeState = AudioAgentRuntimeState.End; + } + } + /// /// 初始化音频代理辅助器。 /// diff --git a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioCategory.cs b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioCategory.cs index 21b8c4d..1afede2 100644 --- a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioCategory.cs +++ b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioCategory.cs @@ -11,8 +11,7 @@ namespace AlicizaX.Audio.Runtime [Serializable] public class AudioCategory { - [SerializeField] - private AudioMixer audioMixer = null; + [SerializeField] private AudioMixer audioMixer = null; public List AudioAgents; private readonly AudioMixerGroup _audioMixerGroup; @@ -112,6 +111,50 @@ namespace AlicizaX.Audio.Runtime } } + public AudioAgent Play(AudioClip clip) + { + if (!_bEnable) + { + return null; + } + + int freeChannel = -1; + float duration = -1; + + for (int i = 0; i < AudioAgents.Count; i++) + { + if (AudioAgents[i].IsFree) + { + freeChannel = i; + break; + } + else if (AudioAgents[i].Duration > duration) + { + duration = AudioAgents[i].Duration; + freeChannel = i; + } + } + + if (freeChannel >= 0) + { + if (AudioAgents[freeChannel] == null) + { + AudioAgents[freeChannel] = AudioAgent.Create(clip, this); + } + else + { + AudioAgents[freeChannel].SetAudioClip(clip); + } + + return AudioAgents[freeChannel]; + } + else + { + Log.Error($"Here is no channel to play audio clip"); + return null; + } + } + /// /// 播放音频。 /// diff --git a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioModule.cs b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioModule.cs index 464bb4d..d5fdbad 100644 --- a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioModule.cs +++ b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/AudioModule.cs @@ -457,6 +457,25 @@ namespace AlicizaX.Audio.Runtime } } + public AudioAgent Play(AudioType type, AudioClip clip, bool bLoop = false, float volume = 1.0f) + { + if (_bUnityAudioDisabled) + { + return null; + } + + AudioAgent audioAgent = _audioCategories[(int)type].Play(clip); + { + if (audioAgent != null) + { + audioAgent.IsLoop = bLoop; + audioAgent.Volume = volume; + } + + return audioAgent; + } + } + /// /// 停止某类声音播放。 /// diff --git a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/IAudioModule.cs b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/IAudioModule.cs index 2098603..b46f74e 100644 --- a/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/IAudioModule.cs +++ b/Client/Packages/com.alicizax.unity.audio/Runtime/Audio/IAudioModule.cs @@ -96,6 +96,7 @@ namespace AlicizaX.Audio.Runtime /// 是否支持资源池。 public AudioAgent Play(AudioType type, string path, bool bLoop = false, float volume = 1.0f, bool bAsync = false, bool bInPool = false); + public AudioAgent Play(AudioType type,AudioClip clip,bool loop=false,float volume = 1.0f); /// /// 停止某类声音播放。 /// diff --git a/Client/Packages/com.alicizax.unity.editor.extension b/Client/Packages/com.alicizax.unity.editor.extension index 2914534..8d5c2e0 160000 --- a/Client/Packages/com.alicizax.unity.editor.extension +++ b/Client/Packages/com.alicizax.unity.editor.extension @@ -1 +1 @@ -Subproject commit 2914534c6657af23bbad62a00fbb86c602070cbe +Subproject commit 8d5c2e0e012b5589f47ee3abd466d00196a98722 diff --git a/Client/Packages/com.alicizax.unity.entry/Runtime/AlicizaX.Entry.Runtime.asmdef b/Client/Packages/com.alicizax.unity.entry/Runtime/AlicizaX.Entry.Runtime.asmdef index b3c7b3d..b19c97f 100644 --- a/Client/Packages/com.alicizax.unity.entry/Runtime/AlicizaX.Entry.Runtime.asmdef +++ b/Client/Packages/com.alicizax.unity.entry/Runtime/AlicizaX.Entry.Runtime.asmdef @@ -22,6 +22,12 @@ "precompiledReferences": [], "autoReferenced": true, "defineConstraints": [], - "versionDefines": [], + "versionDefines": [ + { + "name": "com.alicizax.unity.network", + "expression": "", + "define": "ALICIZAX_NETWORK" + } + ], "noEngineReferences": false } \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.entry/Runtime/GameApp.Network.cs b/Client/Packages/com.alicizax.unity.entry/Runtime/GameApp.Network.cs index 9292671..5252304 100644 --- a/Client/Packages/com.alicizax.unity.entry/Runtime/GameApp.Network.cs +++ b/Client/Packages/com.alicizax.unity.entry/Runtime/GameApp.Network.cs @@ -1,4 +1,4 @@ - +#if ALICIZAX_NETWORK using AlicizaX.Network.Runtime; using AlicizaX; @@ -22,3 +22,5 @@ public static partial class GameApp internal static INetworkModule _network; } + +#endif diff --git a/Client/Packages/com.alicizax.unity.entry/Runtime/GameAppStaticMemberReset.cs b/Client/Packages/com.alicizax.unity.entry/Runtime/GameAppStaticMemberReset.cs index b7a3c6e..d034471 100644 --- a/Client/Packages/com.alicizax.unity.entry/Runtime/GameAppStaticMemberReset.cs +++ b/Client/Packages/com.alicizax.unity.entry/Runtime/GameAppStaticMemberReset.cs @@ -23,7 +23,9 @@ internal static class GameAppStaticMemberReset GameApp._event = null; GameApp._fsm = null; GameApp._localization = null; +#if ALICIZAX_NETWORK GameApp._network = null; +#endif GameApp._objectPool = null; GameApp._resource = null; GameApp._scene = null; diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor.meta deleted file mode 100644 index c29c0e1..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3bdb20201b2e1164e996135c914b1fea -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/AlicizaX.UI.Extension.Editor.asmdef b/Client/Packages/com.alicizax.unity.ui.extension/Editor/AlicizaX.UI.Extension.Editor.asmdef deleted file mode 100644 index 8276769..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/AlicizaX.UI.Extension.Editor.asmdef +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "AlicizaX.UI.Extension.Editor", - "rootNamespace": "AlicizaX.UI.Extension.Editor", - "references": [ - "GUID:6546d7765b4165b40850b3667f981c26", - "GUID:760f1778adc613f49a4394fb41ff0bbc", - "GUID:75b6f2078d190f14dbda4a5b747d709c", - "GUID:a19b414bea3b97240a91aeab9a8eab36", - "GUID:83a193b118cfbef48a344187e07f53bb", - "GUID:acfef7cabed3b0a42b25edb1cd4fa259", - "GUID:6055be8ebefd69e48b49212b09b47b2f" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": true, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/AlicizaX.UI.Extension.Editor.asmdef.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/AlicizaX.UI.Extension.Editor.asmdef.meta deleted file mode 100644 index 0df5a0e..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/AlicizaX.UI.Extension.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 313320016f75fd24e9885858267ed35c -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension.meta deleted file mode 100644 index b9d43cf..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a9fd90c759c54481924b9549fa2d0330 -timeCreated: 1743598816 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension/MenuExtension.cs b/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension/MenuExtension.cs deleted file mode 100644 index c4cb927..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension/MenuExtension.cs +++ /dev/null @@ -1,37 +0,0 @@ -using UnityEditor; -using UnityEngine; -using UnityEngine.UI; - -namespace AlicizaX.UI.Extension.Editor -{ - internal static class MenuExtension - { - [MenuItem("GameObject/UX/UXTextMeshPro", false, -1)] - private static void CreateUxTextMeshProUx() - { - GameObject selectionObject = Selection.activeGameObject; - var gameObject = new GameObject("UXTextMeshPro", typeof(UXTextMeshPro)); - gameObject.transform.SetParent(selectionObject.transform); - var rectTransform = gameObject.GetComponent(); - var uxTextMeshPro = gameObject.GetComponent(); - uxTextMeshPro.text = "UXTextMeshPro"; - rectTransform.anchoredPosition = Vector2.zero; - rectTransform.localPosition = Vector3.zero; - rectTransform.pivot = new Vector2(0.5f, 0.5f); - rectTransform.localScale = Vector3.one; - Selection.activeGameObject = gameObject; - } - - [MenuItem("GameObject/UX/RecyclerView", false, -1)] - private static void CreateUxRecyclerView() - { - GameObject selectionObject = Selection.activeGameObject; - if (selectionObject == null) return; - const string prefabPath = "Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab"; - GameObject prefab = AssetDatabase.LoadAssetAtPath(prefabPath); - GameObject instance = (GameObject)PrefabUtility.InstantiatePrefab(prefab, selectionObject.transform); - PrefabUtility.UnpackPrefabInstance(instance, PrefabUnpackMode.Completely, InteractionMode.UserAction); - Selection.activeGameObject = instance; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension/MenuExtension.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension/MenuExtension.cs.meta deleted file mode 100644 index 7458225..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/MenuExtension/MenuExtension.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a33cf28b887a48c3970fca2a7720b876 -timeCreated: 1743598823 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView.meta deleted file mode 100644 index 0abfca9..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2856fb53117f4988b9585025859c4075 -timeCreated: 1748497429 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/RecyclerViewEditor.cs b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/RecyclerViewEditor.cs deleted file mode 100644 index f040e2c..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/RecyclerViewEditor.cs +++ /dev/null @@ -1,472 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System; -using System.Collections.Generic; -using System.Linq; -using AlicizaX.UI.RecyclerView; -using UnityEngine.UI; -using Object = UnityEngine.Object; - -[CustomEditor(typeof(RecyclerView))] -public class RecyclerViewEditor : Editor -{ - // Layout Manager - private SerializedProperty _layoutManagerTypeName; - private SerializedProperty _layoutManager; - private List _layoutTypeNames = new List(); - private int _selectedLayoutIndex; - - // Scroller - private SerializedProperty scroll; - private SerializedProperty _scroller; - private SerializedProperty _scrollerTypeName; - private List _scrollerTypes = new List(); - private List _scrollerTypeNames; - private int _selectedScrollerIndex; - - // Base Properties - private SerializedProperty direction; - private SerializedProperty alignment; - private SerializedProperty content; - private SerializedProperty spacing; - private SerializedProperty padding; - private SerializedProperty snap; - private SerializedProperty scrollSpeed; - private SerializedProperty wheelSpeed; - private SerializedProperty templates; - - private SerializedProperty _showScrollBar; - private SerializedProperty _scrollbar; - - private const string NoneOptionName = "None"; - - private void OnEnable() - { - // Layout Manager - _layoutManagerTypeName = serializedObject.FindProperty("_layoutManagerTypeName"); - _layoutManager = serializedObject.FindProperty("_layoutManager"); - RefreshLayoutTypes(); - - // Scroller - scroll = serializedObject.FindProperty("scroll"); - _scroller = serializedObject.FindProperty("_scroller"); - _scrollerTypeName = serializedObject.FindProperty("_scrollerTypeName"); - RefreshScrollerTypes(); - SyncExistingScroller(); - - // Base Properties - direction = serializedObject.FindProperty("direction"); - alignment = serializedObject.FindProperty("alignment"); - content = serializedObject.FindProperty("content"); - spacing = serializedObject.FindProperty("spacing"); - padding = serializedObject.FindProperty("padding"); - snap = serializedObject.FindProperty("snap"); - scrollSpeed = serializedObject.FindProperty("scrollSpeed"); - wheelSpeed = serializedObject.FindProperty("wheelSpeed"); - templates = serializedObject.FindProperty("templates"); - _showScrollBar = serializedObject.FindProperty("_showScrollBar"); - _scrollbar = serializedObject.FindProperty("_scrollbar"); - } - - #region Layout Manager - - void RefreshLayoutTypes() - { - _layoutTypeNames.Clear(); - _layoutTypeNames.Add(NoneOptionName); - - // 获取所有实现ILayoutManager的非Mono类型 - var types = AlicizaX.Utility.Assembly.GetRuntimeTypes(typeof(ILayoutManager)); - foreach (var type in types) - { - if (!typeof(MonoBehaviour).IsAssignableFrom(type)) - { - _layoutTypeNames.Add(type.FullName); - } - } - - _selectedLayoutIndex = Mathf.Clamp( - _layoutTypeNames.IndexOf(_layoutManagerTypeName.stringValue), - 0, - _layoutTypeNames.Count - 1 - ); - } - - #endregion - - #region Scroller - - void RefreshScrollerTypes() - { - _scrollerTypes = TypeCache.GetTypesDerivedFrom() - .Where(t => t.IsSubclassOf(typeof(MonoBehaviour))) - .ToList(); - - _scrollerTypeNames = _scrollerTypes - .Select(t => t.FullName) - .Prepend(NoneOptionName) - .ToList(); - } - - void SyncExistingScroller() - { - var rv = target as RecyclerView; - if (rv == null) return; - - var existing = rv.GetComponent(); - if (existing != null) - { - _scrollerTypeName.stringValue = existing.GetType().FullName; - _selectedScrollerIndex = _scrollerTypeNames.IndexOf(_scrollerTypeName.stringValue); - } - else - { - _selectedScrollerIndex = 0; - } - } - - #endregion - - public override void OnInspectorGUI() - { - serializedObject.Update(); - bool isPlaying = Application.isPlaying; - - DrawLayoutManagerSection(isPlaying); - DrawBaseSettings(isPlaying); - DrawScrollerSettings(isPlaying); - DrawTemplatesSection(); - - serializedObject.ApplyModifiedProperties(); - } - - #region Drawing Methods - - void DrawLayoutManagerSection(bool isPlaying) - { - EditorGUILayout.BeginVertical("box"); - { - EditorGUILayout.LabelField("Layout Manager", EditorStyles.boldLabel); - - using (new EditorGUI.DisabledScope(isPlaying)) - { - // 强制允许选择空值 - int newIndex = EditorGUILayout.Popup("Layout Type", _selectedLayoutIndex, _layoutTypeNames.ToArray()); - if (newIndex != _selectedLayoutIndex) - { - _selectedLayoutIndex = newIndex; // 立即更新索引 - UpdateLayoutManager(newIndex); - } - } - - // 显示布局属性或警告 - if (_layoutManager.managedReferenceValue != null) - { - EditorGUILayout.Space(3); - DrawManagedProperties(_layoutManager); - } - else - { - EditorGUILayout.HelpBox("Need Choose LayoutManager", MessageType.Error); - } - } - EditorGUILayout.EndVertical(); - } - - void DrawBaseSettings(bool isPlaying) - { - EditorGUILayout.BeginVertical("box"); - { - EditorGUILayout.LabelField("Base Settings", EditorStyles.boldLabel); - - using (new EditorGUI.DisabledScope(isPlaying)) - { - EditorGUILayout.PropertyField(direction); - EditorGUILayout.PropertyField(alignment); - EditorGUILayout.PropertyField(content); - } - - EditorGUILayout.Space(5); - EditorGUILayout.LabelField("Spacing", EditorStyles.boldLabel); - EditorGUILayout.PropertyField(spacing); - EditorGUILayout.PropertyField(padding); - - EditorGUILayout.Space(5); - EditorGUILayout.LabelField("Scrolling", EditorStyles.boldLabel); - - using (new EditorGUI.DisabledScope(isPlaying)) - { - bool prevScrollValue = scroll.boolValue; - EditorGUILayout.PropertyField(scroll); - - if (scroll.boolValue != prevScrollValue) - { - HandleScrollToggle(); - if (!scroll.boolValue) - { - ClearScrollBar(); - } - } - } - - if (scroll.boolValue) - { - using (new EditorGUI.DisabledScope(isPlaying)) - { - bool prevShowScrollBarValue = _showScrollBar.boolValue; - EditorGUILayout.PropertyField(_showScrollBar); - - if (_showScrollBar.boolValue != prevShowScrollBarValue) - { - HandleScrollBarToggle(); - } - } - } - - - EditorGUILayout.PropertyField(snap); - } - EditorGUILayout.EndVertical(); - } - - void DrawScrollerSettings(bool isPlaying) - { - if (!scroll.boolValue) return; - - EditorGUILayout.BeginVertical("box"); - { - EditorGUILayout.LabelField("Scroller Settings", EditorStyles.boldLabel); - - using (new EditorGUI.DisabledScope(isPlaying)) - { - int newIndex = EditorGUILayout.Popup("Scroller Type", _selectedScrollerIndex, _scrollerTypeNames.ToArray()); - if (newIndex != _selectedScrollerIndex) - { - UpdateScroller(newIndex); - } - } - - var rv = target as RecyclerView; - if (rv != null) - { - var scrollerComponent = rv.GetComponent(); - if (scrollerComponent != null) - { - DrawComponentProperties(scrollerComponent as MonoBehaviour, "Scroller Properties"); - } - else - { - EditorGUILayout.HelpBox("Must choose to use a Scroller.", MessageType.Error); - } - } - - EditorGUILayout.Space(3); - EditorGUILayout.PropertyField(scrollSpeed); - EditorGUILayout.PropertyField(wheelSpeed); - } - EditorGUILayout.EndVertical(); - } - - void DrawComponentProperties(MonoBehaviour component, string header = null) - { - if (component == null) return; - - EditorGUILayout.Space(3); - if (!string.IsNullOrEmpty(header)) - { - EditorGUILayout.LabelField(header, EditorStyles.boldLabel); - } - - SerializedObject so = new SerializedObject(component); - so.Update(); - - SerializedProperty prop = so.GetIterator(); - bool enterChildren = true; - while (prop.NextVisible(enterChildren)) - { - enterChildren = false; - if (prop.name == "m_Script") continue; - EditorGUILayout.PropertyField(prop, true); - } - - so.ApplyModifiedProperties(); - } - - void DrawTemplatesSection() - { - EditorGUILayout.Space(5); - EditorGUILayout.PropertyField(templates, new GUIContent("Item Templates"), true); - } - - #endregion - - #region Update Handlers - - void UpdateLayoutManager(int selectedIndex) - { - try - { - // 强制清空逻辑 - if (selectedIndex == 0) - { - _layoutManager.managedReferenceValue = null; - _layoutManagerTypeName.stringValue = ""; - _selectedLayoutIndex = 0; // 确保索引同步 - return; - } - - // 有效性检查 - if (selectedIndex < 0 || selectedIndex >= _layoutTypeNames.Count) - { - Debug.LogError($"Invalid layout index: {selectedIndex}"); - _selectedLayoutIndex = 0; - return; - } - - string typeName = _layoutTypeNames[selectedIndex]; - Type type = AlicizaX.Utility.Assembly.GetType(typeName); - - if (type != null && typeof(ILayoutManager).IsAssignableFrom(type)) - { - _layoutManager.managedReferenceValue = Activator.CreateInstance(type); - _layoutManagerTypeName.stringValue = typeName; - _selectedLayoutIndex = selectedIndex; - } - else - { - Debug.LogError($"Invalid layout type: {typeName}"); - _selectedLayoutIndex = 0; - } - } - catch (Exception e) - { - Debug.LogError($"Layout Manager Error: {e.Message}"); - _layoutManager.managedReferenceValue = null; - _layoutManagerTypeName.stringValue = ""; - _selectedLayoutIndex = 0; - } - } - - void UpdateScroller(int selectedIndex) - { - try - { - var rv = target as RecyclerView; - if (rv == null) return; - - Undo.RecordObjects(new UnityEngine.Object[] { rv, this }, "Update Scroller"); - - // 移除旧组件 - var oldScroller = rv.GetComponent(); - if (oldScroller != null) - { - Undo.DestroyObjectImmediate(oldScroller as MonoBehaviour); - } - - if (selectedIndex == 0) - { - // 清除序列化引用 - _scroller.objectReferenceValue = null; - _scrollerTypeName.stringValue = ""; - return; - } - - // 添加新组件 - Type selectedType = _scrollerTypes[selectedIndex - 1]; - var newScroller = Undo.AddComponent(rv.gameObject, selectedType) as IScroller; - - // 同步到序列化属性 - _scroller.objectReferenceValue = newScroller as MonoBehaviour; - _scrollerTypeName.stringValue = selectedType.FullName; - _selectedScrollerIndex = selectedIndex; - - // 立即应用修改 - serializedObject.ApplyModifiedProperties(); - EditorUtility.SetDirty(rv); // 标记对象需要保存 - } - catch (Exception e) - { - Debug.LogError($"Scroller Error: {e}"); - _selectedScrollerIndex = 0; - _scrollerTypeName.stringValue = ""; - _scroller.objectReferenceValue = null; - } - } - - void HandleScrollToggle() - { - var rv = target as RecyclerView; - if (rv == null) return; - - if (!scroll.boolValue) - { - // Remove scroller component - var scrollerComponent = rv.GetComponent(); - if (scrollerComponent != null) - { - Undo.DestroyObjectImmediate(scrollerComponent as MonoBehaviour); - } - - _scrollerTypeName.stringValue = ""; - _selectedScrollerIndex = 0; - } - } - - void HandleScrollBarToggle() - { - var rv = target as RecyclerView; - if (rv == null) return; - if (_showScrollBar.boolValue) - { - Direction direction = (Direction)this.direction.enumValueIndex; - if (direction == Direction.Vertical) - { - const string path = "Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab"; - InstantiateScrollBar(path, rv.transform); - } - else if (direction == Direction.Horizontal) - { - const string path = "Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab"; - InstantiateScrollBar(path, rv.transform); - } - } - else - { - ClearScrollBar(); - } - } - - void ClearScrollBar() - { - _showScrollBar.boolValue = false; - if (_scrollbar.objectReferenceValue != null) - { - Scrollbar scrollbar = _scrollbar.objectReferenceValue as Scrollbar; - _scrollbar.objectReferenceValue = null; - Object.DestroyImmediate(scrollbar.gameObject); - } - } - - #endregion - - void DrawManagedProperties(SerializedProperty property) - { - SerializedProperty iterator = property.Copy(); - bool enterChildren = true; - - while (iterator.NextVisible(enterChildren)) - { - enterChildren = false; - if (iterator.name == "m_Script") continue; - EditorGUILayout.PropertyField(iterator, true); - } - } - - void InstantiateScrollBar(string path, Transform parent) - { - GameObject prefab = AssetDatabase.LoadAssetAtPath(path); - GameObject instance = (GameObject)PrefabUtility.InstantiatePrefab(prefab, parent); - PrefabUtility.UnpackPrefabInstance(instance, PrefabUnpackMode.Completely, InteractionMode.UserAction); - _scrollbar.objectReferenceValue = instance.GetComponent(); - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/RecyclerViewEditor.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/RecyclerViewEditor.cs.meta deleted file mode 100644 index 720bbd4..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/RecyclerViewEditor.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a05527bf8840412aa310698d13cb3196 -timeCreated: 1748497433 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res.meta deleted file mode 100644 index 451e4d2..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 4491d5adb2174f42907cd6bd579711ef -timeCreated: 1748503337 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab deleted file mode 100644 index dc7e40a..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab +++ /dev/null @@ -1,176 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1235572201494389031 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 953826052447570581} - - component: {fileID: 409256563818501030} - - component: {fileID: 4967247000384896254} - - component: {fileID: 2527097672867102998} - - component: {fileID: 144409482669617178} - m_Layer: 5 - m_Name: ScrollView - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &953826052447570581 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235572201494389031} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7227160576944475251} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 250, y: 400} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &409256563818501030 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235572201494389031} - m_CullTransparentMesh: 1 ---- !u!114 &4967247000384896254 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235572201494389031} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.6886792, g: 0.6886792, b: 0.6886792, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &2527097672867102998 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235572201494389031} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7efd8e83d2092b347952108134dc37eb, type: 3} - m_Name: - m_EditorClassIdentifier: - direction: 1 - alignment: 1 - content: {fileID: 7227160576944475251} - spacing: {x: 0, y: 0} - padding: {x: 0, y: 0} - scroll: 1 - snap: 0 - scrollSpeed: 10 - wheelSpeed: 30 - templates: [] - _scrollerTypeName: AlicizaX.UI.RecyclerView.Scroller - _scroller: {fileID: 144409482669617178} - _layoutManagerTypeName: AlicizaX.UI.RecyclerView.LinearLayoutManager - _layoutManager: - rid: 6528754475160043629 - references: - version: 2 - RefIds: - - rid: 6528754475160043629 - type: {class: LinearLayoutManager, ns: AlicizaX.UI.RecyclerView, asm: AlicizaX.UI.Extension} - data: - testValue: 0 ---- !u!114 &144409482669617178 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235572201494389031} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7b7de4cb3a1546e4a9ade6b8dbf8af92, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &9220717789715235424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7227160576944475251} - - component: {fileID: 2326586106184642263} - m_Layer: 5 - m_Name: Content - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7227160576944475251 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9220717789715235424} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 953826052447570581} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2326586106184642263 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9220717789715235424} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: {x: 0, y: 0, z: 0, w: 0} - m_Softness: {x: 0, y: 0} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab.meta deleted file mode 100644 index 4258166..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/ScrollView.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4ed07b7776718d548804a6d7b5539205 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab deleted file mode 100644 index 08b4be3..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab +++ /dev/null @@ -1,252 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2002449542824361868 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 488252331187428264} - - component: {fileID: 2101354351137448834} - - component: {fileID: 8235216341801835209} - - component: {fileID: 8283467313266023839} - - component: {fileID: 3358419500410988058} - m_Layer: 0 - m_Name: horizontal - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &488252331187428264 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2002449542824361868} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7124834573134617791} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -40, y: 10} - m_Pivot: {x: 0.5, y: 0} ---- !u!222 &2101354351137448834 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2002449542824361868} - m_CullTransparentMesh: 1 ---- !u!114 &8235216341801835209 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2002449542824361868} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.3773585, g: 0.3773585, b: 0.3773585, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &8283467313266023839 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2002449542824361868} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2326542036480137540} - m_HandleRect: {fileID: 193229221570547880} - m_Direction: 0 - m_Value: 0 - m_Size: 0.4 - m_NumberOfSteps: 0 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &3358419500410988058 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2002449542824361868} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 682cfe39b0fffe544be8d5c11eb369e5, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &4575532730663240958 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 193229221570547880} - - component: {fileID: 1924433296360427437} - - component: {fileID: 2326542036480137540} - m_Layer: 0 - m_Name: Handle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &193229221570547880 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4575532730663240958} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 7124834573134617791} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1924433296360427437 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4575532730663240958} - m_CullTransparentMesh: 1 ---- !u!114 &2326542036480137540 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4575532730663240958} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &6761444411709800685 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7124834573134617791} - m_Layer: 0 - m_Name: SlidingArea - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7124834573134617791 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6761444411709800685} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 193229221570547880} - m_Father: {fileID: 488252331187428264} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab.meta deleted file mode 100644 index 21915df..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/horizontal.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 98998c9d3c2263646be3f24d0996a493 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab deleted file mode 100644 index 85bace5..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab +++ /dev/null @@ -1,252 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &220331575378582965 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7591792402052135596} - - component: {fileID: 2150618277400837422} - - component: {fileID: 3952935497572886421} - - component: {fileID: 2116943976852970174} - - component: {fileID: 4776801802864796469} - m_Layer: 5 - m_Name: vertical - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7591792402052135596 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 220331575378582965} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 6760799037446078325} - m_Father: {fileID: 0} - 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: 0} - m_SizeDelta: {x: 10, y: 0} - m_Pivot: {x: 0.5, y: 0} ---- !u!222 &2150618277400837422 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 220331575378582965} - m_CullTransparentMesh: 1 ---- !u!114 &3952935497572886421 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 220331575378582965} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.3207547, g: 0.3207547, b: 0.3207547, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &2116943976852970174 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 220331575378582965} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2198892040955573086} - m_HandleRect: {fileID: 2839511060116175760} - m_Direction: 3 - m_Value: 0 - m_Size: 0.515 - m_NumberOfSteps: 0 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &4776801802864796469 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 220331575378582965} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 682cfe39b0fffe544be8d5c11eb369e5, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &2110970298716295489 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2839511060116175760} - - component: {fileID: 1084884340137269109} - - component: {fileID: 2198892040955573086} - m_Layer: 5 - m_Name: Handle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2839511060116175760 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2110970298716295489} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 6760799037446078325} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1084884340137269109 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2110970298716295489} - m_CullTransparentMesh: 1 ---- !u!114 &2198892040955573086 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2110970298716295489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &8790787763373649645 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6760799037446078325} - m_Layer: 5 - m_Name: Sliding Area - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &6760799037446078325 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8790787763373649645} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2839511060116175760} - m_Father: {fileID: 7591792402052135596} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab.meta deleted file mode 100644 index 691f727..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/RecyclerView/Res/vertical.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e657950d0fd9fd443a1cb9d16c3fa86e -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res.meta deleted file mode 100644 index 2bdbb38..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1c397bc7b14cfb8439960f6f74c953ca -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/Scroll-view.png b/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/Scroll-view.png deleted file mode 100644 index c255dd9..0000000 Binary files a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/Scroll-view.png and /dev/null differ diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/Scroll-view.png.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/Scroll-view.png.meta deleted file mode 100644 index 1f32768..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/Scroll-view.png.meta +++ /dev/null @@ -1,117 +0,0 @@ -fileFormatVersion: 2 -guid: a01ce47da31a2e0438fd8d38b203c0d5 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 13 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMipmapLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - cookieLightType: 0 - platformSettings: - - serializedVersion: 4 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - customData: - physicsShape: [] - bones: [] - spriteID: 5e97eb03825dee720800000000000000 - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spriteCustomMetadata: - entries: [] - nameFileIdTable: {} - mipmapLimitGroupName: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_Button Icon.png b/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_Button Icon.png deleted file mode 100644 index 19862c6..0000000 Binary files a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_Button Icon.png and /dev/null differ diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_Button Icon.png.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_Button Icon.png.meta deleted file mode 100644 index 10a5f5c..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_Button Icon.png.meta +++ /dev/null @@ -1,117 +0,0 @@ -fileFormatVersion: 2 -guid: 337b039db051cab44819dc51e6af1f43 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 13 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMipmapLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - cookieLightType: 0 - platformSettings: - - serializedVersion: 4 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - customData: - physicsShape: [] - bones: [] - spriteID: 5e97eb03825dee720800000000000000 - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spriteCustomMetadata: - entries: [] - nameFileIdTable: {} - mipmapLimitGroupName: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_ToggleGroup Icon.png b/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_ToggleGroup Icon.png deleted file mode 100644 index 858eab1..0000000 Binary files a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_ToggleGroup Icon.png and /dev/null differ diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_ToggleGroup Icon.png.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_ToggleGroup Icon.png.meta deleted file mode 100644 index 1750e5e..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/Res/d_ToggleGroup Icon.png.meta +++ /dev/null @@ -1,117 +0,0 @@ -fileFormatVersion: 2 -guid: 42b2d97a2cb439b4395c6dca63357d89 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 13 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMipmapLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - cookieLightType: 0 - platformSettings: - - serializedVersion: 4 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - customData: - physicsShape: [] - bones: [] - spriteID: 5e97eb03825dee720800000000000000 - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spriteCustomMetadata: - entries: [] - nameFileIdTable: {} - mipmapLimitGroupName: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension.meta deleted file mode 100644 index fd09a37..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 3a2c1fc8ad7d457abaf67dae3d5005de -timeCreated: 1738832149 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text.meta deleted file mode 100644 index 31f7d3b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9ae5a45a9c60593458ff7937ccef2268 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text/UXTextMeshProEditor.cs b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text/UXTextMeshProEditor.cs deleted file mode 100644 index 2101979..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text/UXTextMeshProEditor.cs +++ /dev/null @@ -1,49 +0,0 @@ -using UnityEditor; - - -namespace UnityEngine.UI -{ - [CustomEditor(typeof(UXTextMeshPro), true)] - [CanEditMultipleObjects] - public class UXTextMeshProEditor : TMPro.EditorUtilities.TMP_EditorPanelUI - { - private SerializedProperty text; - private SerializedProperty localizationID; - - protected override void OnEnable() - { - text = serializedObject.FindProperty("m_text"); - localizationID = serializedObject.FindProperty("m_localizationID"); - base.OnEnable(); - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - bool isPlay = Application.isPlaying; - - - // Key选择逻辑 - EditorGUILayout.PropertyField(localizationID); - - // - // // 显示预览信息 - // EditorGUI.BeginDisabledGroup(true); - // { - // EditorGUILayout.PropertyField(localizationID); - // if (!string.IsNullOrEmpty(localizationID.stringValue)) - // { - // var entry = _entries.Find(e => e.ID == localizationID.stringValue); - // if (entry != null) - // { - // EditorGUILayout.TextField("当前文本预览", entry.ChineseSimplified); - // } - // } - // } - // EditorGUI.EndDisabledGroup(); - - serializedObject.ApplyModifiedProperties(); - base.OnInspectorGUI(); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text/UXTextMeshProEditor.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text/UXTextMeshProEditor.cs.meta deleted file mode 100644 index 2d8854a..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UIExtension/Text/UXTextMeshProEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 45cc6be3b51ee2045b0c57c17e665f4c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX.meta deleted file mode 100644 index 5730f82..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f770d49c712145179c9d1e9d6cd6b141 -timeCreated: 1744275046 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXButtonEditor.cs b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXButtonEditor.cs deleted file mode 100644 index 46c519c..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXButtonEditor.cs +++ /dev/null @@ -1,309 +0,0 @@ -// UXButtonEditor.cs - -#if UNITY_EDITOR -using System; -using System.Collections.Generic; -using Sirenix.OdinInspector.Editor; -using UnityEditor; -using UnityEditor.AnimatedValues; -using UnityEditor.UI; -using UnityEngine; -using UnityEngine.UI; - -[CanEditMultipleObjects] -[CustomEditor(typeof(UXButton), true)] -public class UXButtonEditor : Editor -{ - private SerializedProperty m_Interactable; - private SerializedProperty m_Mode; - private SerializedProperty m_OnValueChanged; - private SerializedProperty m_OnClick; - private SerializedProperty m_UXGroup; - - private SerializedProperty m_TransitionData; - - private SerializedProperty m_ChildTransitions; - - private SerializedProperty m_ButtonUISounds; - - private bool m_ShowChildTransitions = true; - private Dictionary m_ChildTransitionFoldouts = new Dictionary(); - private UXGroup group; - private int m_ButtonMode; - - private void OnEnable() - { - m_Interactable = serializedObject.FindProperty("m_Interactable"); - m_UXGroup = serializedObject.FindProperty("m_UXGroup"); - m_Mode = serializedObject.FindProperty("m_Mode"); - m_OnValueChanged = serializedObject.FindProperty("m_OnValueChanged"); - m_OnClick = serializedObject.FindProperty("m_OnClick"); - m_TransitionData = serializedObject.FindProperty("m_TransitionData"); - m_ChildTransitions = serializedObject.FindProperty("m_ChildTransitions"); - m_ButtonUISounds = serializedObject.FindProperty("m_ButtonUISounds"); - m_ChildTransitionFoldouts.Clear(); - group = (UXGroup)m_UXGroup.objectReferenceValue; - m_ButtonMode = m_Mode.enumValueIndex; - } - - private void ResetEventProperty(SerializedProperty property) - { - SerializedProperty persistentCalls = property.FindPropertyRelative("m_PersistentCalls"); - SerializedProperty calls = persistentCalls.FindPropertyRelative("m_Calls"); - calls.arraySize = 0; - property.serializedObject.ApplyModifiedProperties(); - } - public override void OnInspectorGUI() - { - serializedObject.Update(); - - EditorGUI.BeginDisabledGroup(EditorApplication.isPlaying); - EditorGUILayout.PropertyField(m_Mode); - EditorGUI.EndDisabledGroup(); - EditorGUILayout.PropertyField(m_Interactable); - - GUILayout.Space(1); - DrawSelfTransition(); - - GUILayout.Space(5); - DrawChildTransitions(); - - - EditorGUILayout.PropertyField(m_ButtonUISounds); - EditorGUILayout.Space(); - - if (m_Mode.enumValueIndex != m_ButtonMode) - { - if (m_ButtonMode == (int)ButtonModeType.Normal) - { - ResetEventProperty(m_OnValueChanged); - m_UXGroup.objectReferenceValue = null; - } - else - { - ResetEventProperty((m_OnClick)); - } - - m_ButtonMode = m_Mode.enumValueIndex; - } - - if (m_Mode.enumValueIndex == (int)ButtonModeType.Toggle) - { - EditorGUILayout.PropertyField(m_UXGroup); - UXGroup newGroup = (UXGroup)m_UXGroup.objectReferenceValue; - if (newGroup != group) - { - UXButton self = target as UXButton; - if (group != null) - { - group.UnregisterButton(self); - } - - group = newGroup; - if (newGroup != null) - { - newGroup.RegisterButton(self); - } - } - - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(m_OnValueChanged); - } - else - { - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(m_OnClick); - } - - - serializedObject.ApplyModifiedProperties(); - } - - private void DrawChildTransitions() - { - m_ShowChildTransitions = EditorGUILayout.Foldout(m_ShowChildTransitions, "Child Transitions", true); - if (!m_ShowChildTransitions) - return; - - EditorGUI.indentLevel++; - - // 列表控制按钮 - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - - if (GUILayout.Button("Add Child Transition", GUILayout.Width(150))) - { - m_ChildTransitions.arraySize++; - serializedObject.ApplyModifiedProperties(); - } - - EditorGUILayout.EndHorizontal(); - - // 遍历列表元素 - for (int i = 0; i < m_ChildTransitions.arraySize; i++) - { - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - - // 获取当前元素的SerializedProperty - SerializedProperty element = m_ChildTransitions.GetArrayElementAtIndex(i); - - // 初始化折叠状态 - if (!m_ChildTransitionFoldouts.ContainsKey(i)) - m_ChildTransitionFoldouts[i] = true; - - // 折叠标题 - string elementTitle = $"Child Transition {i}"; - if (element.FindPropertyRelative("targetGraphic").objectReferenceValue != null) - elementTitle += $" ({element.FindPropertyRelative("targetGraphic").objectReferenceValue.name})"; - - m_ChildTransitionFoldouts[i] = EditorGUILayout.Foldout(m_ChildTransitionFoldouts[i], elementTitle, true); - - if (m_ChildTransitionFoldouts[i]) - { - // 绘制单个TransitionData - DrawTransitionData(element); - - // 删除按钮 - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - var orginColor = GUI.backgroundColor; - GUI.backgroundColor = Color.red; - if (GUILayout.Button("Remove", GUILayout.Width(80))) - { - m_ChildTransitions.DeleteArrayElementAtIndex(i); - m_ChildTransitionFoldouts.Remove(i); - serializedObject.ApplyModifiedProperties(); - break; // 删除后退出当前循环 - } - - GUI.backgroundColor = orginColor; - - EditorGUILayout.EndHorizontal(); - } - - EditorGUILayout.EndVertical(); - EditorGUILayout.Space(5); - } - - EditorGUI.indentLevel--; - } - - private void DrawTransitionData(SerializedProperty transitionData) - { - SerializedProperty targetGraphic = transitionData.FindPropertyRelative("targetGraphic"); - SerializedProperty transition = transitionData.FindPropertyRelative("transition"); - SerializedProperty colorBlock = transitionData.FindPropertyRelative("colors"); - SerializedProperty spriteState = transitionData.FindPropertyRelative("spriteState"); - - EditorGUI.indentLevel++; - - // 绘制目标图形 - EditorGUILayout.PropertyField(targetGraphic); - - // 获取当前transition类型 - var currentTransition = GetTransition(transition); - - // 绘制transition类型 - EditorGUILayout.PropertyField(transition); - - // 显示警告信息 - var graphic = targetGraphic.objectReferenceValue as Graphic; - switch (currentTransition) - { - case Selectable.Transition.ColorTint: - if (graphic == null) - EditorGUILayout.HelpBox("需要Graphic组件来使用颜色过渡", MessageType.Warning); - break; - - case Selectable.Transition.SpriteSwap: - if (!(graphic is Image)) - EditorGUILayout.HelpBox("需要Image组件来使用精灵切换", MessageType.Warning); - break; - } - - // 绘制对应类型的属性 - switch (currentTransition) - { - case Selectable.Transition.ColorTint: - CheckAndSetColorDefaults(colorBlock, targetGraphic); - EditorGUILayout.PropertyField(colorBlock); - break; - - case Selectable.Transition.SpriteSwap: - EditorGUILayout.PropertyField(spriteState); - break; - } - - EditorGUI.indentLevel--; - } - - void CheckAndSetColorDefaults(SerializedProperty colorBlock, SerializedProperty targetGraphic) - { - bool isDirty = false; - string[] colorProps = new string[] { "m_NormalColor", "m_HighlightedColor", "m_PressedColor", "m_SelectedColor", "m_DisabledColor" }; - foreach (var propName in colorProps) - { - SerializedProperty prop = colorBlock.FindPropertyRelative(propName); - Color color = prop.colorValue; - if (color.r == 0 && color.g == 0 && color.b == 0 && color.a == 0) - { - isDirty = true; - if (prop.name == "m_PressedColor") - { - prop.colorValue = new Color(0.7843137f, 0.7843137f, 0.7843137f, 1.0f); - } - else if (prop.name == "m_DisabledColor") - { - prop.colorValue = new Color(0.7843137f, 0.7843137f, 0.7843137f, 0.5f); - } - else - { - prop.colorValue = Color.white; - } - } - } - - SerializedProperty fadeDuration = colorBlock.FindPropertyRelative("m_FadeDuration"); - SerializedProperty m_ColorMultiplier = colorBlock.FindPropertyRelative("m_ColorMultiplier"); - if (isDirty) - { - m_ColorMultiplier.floatValue = 1f; - fadeDuration.floatValue = 0.1f; - } - - var graphic = targetGraphic.objectReferenceValue as Graphic; - if (graphic != null) - { - if (!EditorApplication.isPlaying) - { - Color color = colorBlock.FindPropertyRelative("m_NormalColor").colorValue; - graphic.canvasRenderer.SetColor(color); - } - } - } - - private void DrawSelfTransition() - { - EditorGUILayout.LabelField("Main Transition", EditorStyles.boldLabel); - SerializedProperty targetGraphic = m_TransitionData.FindPropertyRelative("targetGraphic"); - var graphic = targetGraphic.objectReferenceValue as Graphic; - if (graphic == null) - { - graphic = (target as UXButton).GetComponent(); - targetGraphic.objectReferenceValue = graphic; - } - - EditorGUI.indentLevel++; - DrawTransitionData(m_TransitionData); - EditorGUI.indentLevel--; - EditorGUILayout.Space(); - } - - - static Selectable.Transition GetTransition(SerializedProperty transition) - { - return (Selectable.Transition)transition.enumValueIndex; - } -} - -#endif diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXButtonEditor.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXButtonEditor.cs.meta deleted file mode 100644 index a2c0be7..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXButtonEditor.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 1a6fb65845fb481293f57b30b1bfcb3b -timeCreated: 1744275051 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXGroupEditor.cs b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXGroupEditor.cs deleted file mode 100644 index b523426..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXGroupEditor.cs +++ /dev/null @@ -1,29 +0,0 @@ -// using UnityEditor; -// -// #if UNITY_EDITOR -// [CustomEditor(typeof(UXGroup))] -// public class UXGroupEditor : Editor -// { -// private SerializedProperty m_AllowSwitchOff; -// private SerializedProperty m_Buttons; -// private SerializedProperty m_OnSelectedChanged; -// -// private void OnEnable() -// { -// m_AllowSwitchOff = serializedObject.FindProperty("m_AllowSwitchOff"); -// m_Buttons = serializedObject.FindProperty("m_Buttons"); -// m_OnSelectedChanged = serializedObject.FindProperty("onSelectedChanged"); -// } -// -// public override void OnInspectorGUI() -// { -// serializedObject.Update(); -// -// EditorGUILayout.PropertyField(m_AllowSwitchOff); -// EditorGUILayout.PropertyField(m_Buttons, true); -// EditorGUILayout.PropertyField(m_OnSelectedChanged); -// -// serializedObject.ApplyModifiedProperties(); -// } -// } -// #endif diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXGroupEditor.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXGroupEditor.cs.meta deleted file mode 100644 index 3bbd213..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Editor/UX/UXGroupEditor.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d66e1f78170d455c93d71e71ee8f735a -timeCreated: 1744275087 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/LICENSE.md b/Client/Packages/com.alicizax.unity.ui.extension/LICENSE.md deleted file mode 100644 index 4e6513a..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [2023] [ALianBlank of copyright owner][alianblank@outlook.com][https://alianblank.com/] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime.meta deleted file mode 100644 index 8e0379f..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7171839096c9ab141a0fa296b7558c5f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/AlicizaX.UI.Extension.asmdef b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/AlicizaX.UI.Extension.asmdef deleted file mode 100644 index c518311..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/AlicizaX.UI.Extension.asmdef +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "AlicizaX.UI.Extension", - "rootNamespace": "AlicizaX.UI.Extension", - "references": [ - "GUID:6055be8ebefd69e48b49212b09b47b2f", - "GUID:5553d74549d54e74cb548b3ab58a8483", - "GUID:75b6f2078d190f14dbda4a5b747d709c", - "GUID:a19b414bea3b97240a91aeab9a8eab36", - "GUID:198eb6af143bbc4488e2779d96697e06", - "GUID:80ecb87cae9c44d19824e70ea7229748", - "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:33661e06c33d31b4c9223810bf503247", - "GUID:e9c35c8938f782649bb7e670099ca425" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": true, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/AlicizaX.UI.Extension.asmdef.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/AlicizaX.UI.Extension.asmdef.meta deleted file mode 100644 index 0dbdb90..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/AlicizaX.UI.Extension.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 760f1778adc613f49a4394fb41ff0bbc -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension.meta deleted file mode 100644 index c6baa56..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dc3fb1c1caf6fbd40a900ca46f204e07 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension/ZeroGCTypewriterPro.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension/ZeroGCTypewriterPro.cs deleted file mode 100644 index 84631bb..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension/ZeroGCTypewriterPro.cs +++ /dev/null @@ -1,236 +0,0 @@ -// using UnityEngine; -// -// using System; -// using System.Collections.Generic; -// using Cysharp.Threading.Tasks; -// using Cysharp.Threading.Tasks.Triggers; -// using TMPro; -// using UnityEngine; -// using UnityEngine.Pool; -// using System.Threading; -// using System.Runtime.CompilerServices; -// using Cysharp.Text; -// -// namespace text -// { -// public static class ZeroGCTypewriterPro -// { -// #region 核心结构体 -// -// private struct TypewriterHandle : IEquatable -// { -// public int InstanceID; -// public int Version; -// -// public bool Equals(TypewriterHandle other) => -// InstanceID == other.InstanceID && Version == other.Version; -// } -// -// private struct TypewriterJob -// { -// public TypewriterHandle Handle; -// public TMP_Text Target; -// public string Content; -// public float Speed; -// public int LoopCount; -// public Action OnUpdate; -// public Action OnComplete; -// public CancellationToken ExternalToken; -// } -// -// #endregion -// -// #region 状态管理 -// -// private static readonly Dictionary activeJobs = -// new Dictionary(32); -// -// private struct ActiveJob -// { -// public int Version; -// public CancellationTokenSource Cts; -// } -// -// private static readonly ObjectPool ctsPool = -// ObjectPool( -// createFunc: () => new CancellationTokenSource(), -// actionOnRelease: cts => cts.Cancel(), -// collectionCheck: false -// ); -// -// #endregion -// -// #region 公开接口 -// -// [MethodImpl(MethodImplOptions.AggressiveInlining)] -// public static void Play( -// this TMP_Text text, -// string content, -// float charsPerSecond = 30, -// int loopCount = 0, -// Action onUpdate = null, -// Action onComplete = null, -// CancellationToken externalToken = default) -// { -// var instanceID = text.GetInstanceID(); -// -// // 停止当前任务(如果有) -// if (activeJobs.TryGetValue(instanceID, out var existingJob)) -// { -// ctsPool.Release(existingJob.Cts); -// activeJobs.Remove(instanceID); -// } -// -// // 从对象池获取CTS -// var cts = ctsPool.Get(); -// var linkedToken = CombineTokens( -// text.GetCancellationTokenOnDestroy(), -// externalToken, -// cts.Token -// ); -// -// // 创建新任务 -// var newVersion = activeJobs.TryGetValue(instanceID, out var job) ? job.Version + 1 : 1; -// -// activeJobs[instanceID] = new ActiveJob -// { -// Version = newVersion, -// Cts = cts -// }; -// -// RunJob(new TypewriterJob -// { -// Handle = new TypewriterHandle -// { -// InstanceID = instanceID, -// Version = newVersion -// }, -// Target = text, -// Content = content, -// Speed = Mathf.Max(0.01f, charsPerSecond), -// LoopCount = loopCount, -// OnUpdate = onUpdate, -// OnComplete = onComplete, -// ExternalToken = linkedToken -// }).Forget(); -// } -// -// [MethodImpl(MethodImplOptions.AggressiveInlining)] -// public static void Stop(this TMP_Text text) -// { -// var instanceID = text.GetInstanceID(); -// if (activeJobs.TryGetValue(instanceID, out var job)) -// { -// ctsPool.Release(job.Cts); -// activeJobs.Remove(instanceID); -// ResetTextState(text); -// } -// } -// -// #endregion -// -// #region 核心逻辑 -// -// private static async UniTaskVoid RunJob(TypewriterJob job) -// { -// try -// { -// var target = job.Target; -// using (var sb = ZString.CreateStringBuilder()) -// { -// sb.Append(job.Content); -// target.text = sb.ToString(); -// target.ForceMeshUpdate(); -// -// int currentLoop = 0; -// var chars = sb.AsSpan(); -// var interval = 1f / job.Speed; -// var timer = 0f; -// -// while (IsLoopValid(currentLoop, job.LoopCount)) -// { -// target.maxVisibleCharacters = 0; -// -// for (int i = 0; i < chars.Length; i++) -// { -// // 版本校验 -// if (!IsHandleValid(job.Handle)) return; -// -// // 基于时间的更新 -// timer += Time.deltaTime; -// var required = (int)(timer * job.Speed); -// -// if (required > i) -// { -// target.maxVisibleCharacters = required; -// job.OnUpdate?.Invoke(required); -// } -// -// await UniTask.Yield(PlayerLoopTiming.Update, job.ExternalToken); -// } -// -// currentLoop++; -// timer = 0f; -// job.OnComplete?.Invoke(); -// } -// } -// } -// finally -// { -// if (IsHandleValid(job.Handle)) -// { -// activeJobs.Remove(job.Handle.InstanceID); -// ResetTextState(job.Target); -// } -// } -// } -// -// #endregion -// -// #region 工具方法 -// -// [MethodImpl(MethodImplOptions.AggressiveInlining)] -// private static bool IsHandleValid(TypewriterHandle handle) -// { -// return activeJobs.TryGetValue(handle.InstanceID, out var job) && -// job.Version == handle.Version; -// } -// -// [MethodImpl(MethodImplOptions.AggressiveInlining)] -// private static bool IsLoopValid(int current, int max) => -// max < 0 || current <= max; -// -// private static CancellationToken CombineTokens( -// CancellationToken token1, -// CancellationToken token2, -// CancellationToken token3) -// { -// if (token1.CanBeCanceled && token2.CanBeCanceled && token3.CanBeCanceled) -// return CancellationTokenSource.CreateLinkedTokenSource( -// token1, token2, token3).Token; -// -// if (token1.CanBeCanceled && token2.CanBeCanceled) -// return CancellationTokenSource.CreateLinkedTokenSource( -// token1, token2).Token; -// -// return token1.CanBeCanceled ? token1 : token2; -// } -// -// private static void ResetTextState(TMP_Text text) -// { -// if (text != null) -// { -// text.maxVisibleCharacters = int.MaxValue; -// text.SetVerticesDirty(); -// } -// } -// -// private static CancellationToken GetCancellationTokenOnDestroy(this TMP_Text text) -// { -// return text.gameObject.GetCancellationTokenOnDestroy(); -// } -// -// #endregion -// } -// -// } diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension/ZeroGCTypewriterPro.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension/ZeroGCTypewriterPro.cs.meta deleted file mode 100644 index 80bda8c..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/Extension/ZeroGCTypewriterPro.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: dd18a7ac84917984dbbf48f71872add9 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView.meta deleted file mode 100644 index 45350a2..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 20aaf5daa7c6f1144be40271786f5aca -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter.meta deleted file mode 100644 index c2805af..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c55a613d7aa2a27448539712f0cf3875 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/Adapter.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/Adapter.cs deleted file mode 100644 index bea7917..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/Adapter.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace AlicizaX.UI.RecyclerView -{ - public class Adapter : IAdapter - { - protected RecyclerView recyclerView; - - protected List list; - protected Action onItemClick; - - protected int choiceIndex = -1; - public int ChoiceIndex - { - get => choiceIndex; - set - { - SetChoiceIndex(value); - } - } - - public Adapter(RecyclerView recyclerView) : this(recyclerView, new List(), null) - { - } - - public Adapter(RecyclerView recyclerView, List list) : this(recyclerView, list, null) - { - } - - public Adapter(RecyclerView recyclerView, List list, Action onItemClick) - { - this.recyclerView = recyclerView; - this.list = list; - this.onItemClick = onItemClick; - } - - public virtual int GetItemCount() - { - return list == null ? 0 : list.Count; - } - - public virtual int GetRealCount() - { - return GetItemCount(); - } - - public virtual string GetViewName(int index) - { - return ""; - } - - public virtual void OnBindViewHolder(ViewHolder viewHolder, int index) - { - if (index < 0 || index >= GetItemCount()) return; - - T data = list[index]; - - viewHolder.BindViewData(data); - viewHolder.BindItemClick(data, t => - { - SetChoiceIndex(index); - onItemClick?.Invoke(data); - }); - viewHolder.BindChoiceState(index == choiceIndex); - } - - public virtual void NotifyDataChanged() - { - recyclerView.RequestLayout(); - recyclerView.Refresh(); - } - - public virtual void SetList(List list) - { - this.list = list; - recyclerView.Reset(); - NotifyDataChanged(); - } - - public T GetData(int index) - { - if (index < 0 || index >= GetItemCount()) return default; - - return list[index]; - } - - public void Add(T item) - { - list.Add(item); - NotifyDataChanged(); - } - - public void AddRange(IEnumerable collection) - { - list.AddRange(collection); - NotifyDataChanged(); - } - - public void Insert(int index, T item) - { - list.Insert(index, item); - NotifyDataChanged(); - } - - public void InsertRange(int index, IEnumerable collection) - { - list.InsertRange(index, collection); - NotifyDataChanged(); - } - - public void Remove(T item) - { - int index = list.IndexOf(item); - RemoveAt(index); - } - - public void RemoveAt(int index) - { - if (index < 0 || index >= GetItemCount()) return; - - list.RemoveAt(index); - NotifyDataChanged(); - } - - public void RemoveRange(int index, int count) - { - list.RemoveRange(index, count); - NotifyDataChanged(); - } - - public void RemoveAll(Predicate match) - { - list.RemoveAll(match); - NotifyDataChanged(); - } - - public void Clear() - { - list.Clear(); - NotifyDataChanged(); - } - - public void Reverse(int index, int count) - { - list.Reverse(index, count); - NotifyDataChanged(); - } - - public void Reverse() - { - list.Reverse(); - NotifyDataChanged(); - } - - public void Sort(Comparison comparison) - { - list.Sort(comparison); - NotifyDataChanged(); - } - - public void SetOnItemClick(Action onItemClick) - { - this.onItemClick = onItemClick; - } - - protected void SetChoiceIndex(int index) - { - if (index == choiceIndex) return; - - if (choiceIndex != -1) - { - if (TryGetViewHolder(choiceIndex, out var viewHolder)) - { - viewHolder.BindChoiceState(false); - } - } - - choiceIndex = index; - - if (choiceIndex != -1) - { - if (TryGetViewHolder(choiceIndex, out var viewHolder)) - { - viewHolder.BindChoiceState(true); - } - } - } - - private bool TryGetViewHolder(int index, out ViewHolder viewHolder) - { - viewHolder = recyclerView.ViewProvider.GetViewHolder(index); - return viewHolder != null; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/Adapter.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/Adapter.cs.meta deleted file mode 100644 index a5997c0..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/Adapter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f2fe0ab8191b4944db29445f6f796a50 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/GroupAdapter.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/GroupAdapter.cs deleted file mode 100644 index 585ca9e..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/GroupAdapter.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace AlicizaX.UI.RecyclerView -{ - public class GroupAdapter : Adapter - { - private readonly List showList = new(); - private string groupViewName; - - public GroupAdapter(RecyclerView recyclerView, string groupViewName) : base(recyclerView) - { - this.groupViewName = groupViewName; - } - - public GroupAdapter(RecyclerView recyclerView, List list) : base(recyclerView, list) - { - } - - public GroupAdapter(RecyclerView recyclerView, List list, Action onItemClick) : base(recyclerView, list, onItemClick) - { - } - - public override int GetItemCount() - { - return showList.Count; - } - - public override string GetViewName(int index) - { - return showList[index].viewName; - } - - public override void OnBindViewHolder(ViewHolder viewHolder, int index) - { - if (index < 0 || index >= GetItemCount()) return; - - GroupData data = showList[index]; - - viewHolder.BindViewData(data); - viewHolder.BindItemClick(data, t => - { - if (data.viewName == groupViewName) - { - data.bExpand = !data.bExpand; - NotifyDataChanged(); - } - else - { - SetChoiceIndex(index); - onItemClick?.Invoke(data); - } - }); - } - - public override void NotifyDataChanged() - { - foreach (var data in list) - { - CreateGroup(data.type); - } - - var groupList = showList.FindAll(data => data.viewName == groupViewName); - for (int i = 0; i < groupList.Count; i++) - { - int index = showList.IndexOf(groupList[i]); - Collapse(index); - if (groupList[i].bExpand) - { - Expand(index); - } - } - - foreach (var group in groupList) - { - if (list.FindAll(data => data.type == group.type).Count == 0) - { - showList.Remove(group); - } - } - - base.NotifyDataChanged(); - } - - public override void SetList(List list) - { - showList.Clear(); - base.SetList(list); - } - - private void CreateGroup(int type) - { - var groupData = showList.Find(data => data.type == type && data.viewName == groupViewName); - if (groupData == null) - { - groupData = new GroupData(type, groupViewName, type.ToString()); - showList.Add(groupData); - } - } - - public void Expand(int index) - { - var expandList = list.FindAll(data => data.type == showList[index].type); - showList.InsertRange(index + 1, expandList); - } - - public void Collapse(int index) - { - var collapseList = showList.FindAll(data => data.type == showList[index].type && data.viewName != groupViewName); - showList.RemoveRange(index + 1, collapseList.Count); - } - } - - public class GroupData - { - public bool bExpand; - public int type; - public string viewName; - public string name; - - public GroupData(int type, string viewName, string name) - { - this.type = type; - this.viewName = viewName; - this.name = name; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/GroupAdapter.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/GroupAdapter.cs.meta deleted file mode 100644 index 071409b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/GroupAdapter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1afc560670c303d42b28cc143ed25a8f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/IAdapter.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/IAdapter.cs deleted file mode 100644 index a0648ae..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/IAdapter.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace AlicizaX.UI.RecyclerView -{ - public interface IAdapter - { - int GetItemCount(); - - int GetRealCount(); - - string GetViewName(int index); - - void OnBindViewHolder(ViewHolder viewHolder, int index); - - void NotifyDataChanged(); - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/IAdapter.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/IAdapter.cs.meta deleted file mode 100644 index 539af3e..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/IAdapter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fc979439548585f4097747c34ed12270 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/LoopAdapter.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/LoopAdapter.cs deleted file mode 100644 index 6a7ae6a..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/LoopAdapter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace AlicizaX.UI.RecyclerView -{ - public class LoopAdapter : Adapter - { - public LoopAdapter(RecyclerView recyclerView) : base(recyclerView) - { - } - - public LoopAdapter(RecyclerView recyclerView, List list) : base(recyclerView, list) - { - } - - public LoopAdapter(RecyclerView recyclerView, List list, Action onItemClick) : base(recyclerView, list, onItemClick) - { - } - - public override int GetItemCount() - { - return int.MaxValue; - } - - public override int GetRealCount() - { - return list == null ? 0 : list.Count; - } - - public override void OnBindViewHolder(ViewHolder viewHolder, int index) - { - index %= list.Count; - base.OnBindViewHolder(viewHolder, index); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/LoopAdapter.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/LoopAdapter.cs.meta deleted file mode 100644 index a74969d..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/LoopAdapter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 852ebd0fa448a374aad55404886bfaae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/MixedAdapter.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/MixedAdapter.cs deleted file mode 100644 index d5658ec..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/MixedAdapter.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace AlicizaX.UI.RecyclerView -{ - public class MixedAdapter : Adapter - { - public MixedAdapter(RecyclerView recyclerView) : base(recyclerView) - { - } - - public MixedAdapter(RecyclerView recyclerView, List list) : base(recyclerView, list) - { - } - - public MixedAdapter(RecyclerView recyclerView, List list, Action onItemClick) : base(recyclerView, list, onItemClick) - { - } - - public override string GetViewName(int index) - { - return list[index].viewName; - } - } - - public class MixedData - { - public string viewName; - public string name; - public string icon; - public int number; - public int percent; - - public MixedData(string viewName, string name, string icon, int number, int percent) - { - this.viewName = viewName; - this.name = name; - this.icon = icon; - this.number = number; - this.percent = percent; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/MixedAdapter.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/MixedAdapter.cs.meta deleted file mode 100644 index c893e7c..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Adapter/MixedAdapter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c335290acc1c8b45aa87e6fc2b00b0c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/EaseUtil.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/EaseUtil.cs deleted file mode 100644 index 7ac6fe0..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/EaseUtil.cs +++ /dev/null @@ -1,192 +0,0 @@ -using System; - -public class EaseUtil -{ - public static double EaseInSine(float x) - { - return 1 - Math.Cos(x * Math.PI / 2); - } - - public static double EaseOutSine(float x) - { - return Math.Sin(x * Math.PI / 2); - } - - public static double EaseInOutSine(float x) - { - return -(Math.Cos(Math.PI * x) - 1) / 2; - } - - public static double EaseInQuad(float x) - { - return x * x; - } - - public static double EaseOutQuad(float x) - { - return 1 - (1 - x) * (1 - x); - } - - public static double EaseInOutQuad(float x) - { - return x < 0.5 ? 2 * x * x : 1 - Math.Pow(-2 * x + 2, 2) / 2; - } - - public static double EaseInQuart(float x) - { - return Math.Pow(x, 4); - } - - public static double EaseOutQuart(float x) - { - return 1 - Math.Pow(1 - x, 4); - } - - public static double EaseInOutQuart(float x) - { - return x < 0.5 ? 8 * x * x * x * x : 1 - Math.Pow(-2 * x + 2, 4) / 2; - } - - public static double EaseInCubic(float x) - { - return Math.Pow(x, 3); - } - - public static double EaseOutCubic(float x) - { - return 1 - Math.Pow(1 - x, 3); - } - - public static double EaseInOutCubic(float x) - { - return x < 0.5f ? 4 * x * x * x : 1 - Math.Pow(-2 * x + 2, 3) / 2; - } - - public static double EaseInQuint(float x) - { - return Math.Pow(x, 5); - } - - public static double EaseOutQuint(float x) - { - return 1 - Math.Pow(1 - x, 5); - } - - public static double EaseInOutQuint(float x) - { - return x < 0.5f ? 16 * Math.Pow(x, 5) : 1 - Math.Pow(-2 * x + 2, 5) / 2; - } - - public static double EaseInExpo(float x) - { - return x == 0 ? 0 : Math.Pow(2, 10 * x - 10); - } - - public static double EaseOutExpo(float x) - { - return x == 1 ? 1 : 1 - Math.Pow(2, -10 * x); - } - - public static double EaseInOutExpo(float x) - { - return x == 0 ? 0 : - x == 1 ? 1 : - x < 0.5 ? Math.Pow(2, 20 * x - 10) / 2 : - (2 - Math.Pow(2, -20 * x + 10)) / 2; - } - - public static double EaseInCirc(float x) - { - return 1 - Math.Sqrt(1 - Math.Pow(x, 2)); - } - - public static double EaseOutCirc(float x) - { - return Math.Sqrt(1 - Math.Pow(x - 1, 2)); - } - - public static double EaseInOutCirc(float x) - { - return x < 0.5 ? (1 - Math.Sqrt(1 - Math.Pow(2 * x, 2))) / 2 : (Math.Sqrt(1 - Math.Pow(-2 * x + 2, 2)) + 1) / 2; - } - - public static double EaseInBack(float x) - { - double c1 = 1.70158; - double c3 = c1 + 1; - - return c3 * x * x * x - c1 * x * x; - } - - public static double EaseOutBack(float x) - { - double c1 = 1.70158; - double c3 = c1 + 1; - - return 1 + c3 * Math.Pow(x - 1, 3) + c1 * Math.Pow(x - 1, 2); - } - - public static double EaseInOutBack(float x) - { - double c1 = 1.70158; - double c2 = c1 * 1.525; - - return x < 0.5 ? - Math.Pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : - (Math.Pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2; - } - - public static double EaseInElastic(float x) - { - double c4 = 2 * Math.PI / 3; - return x == 0 ? 0 : x == 1 ? 1 : -Math.Pow(2, 10 * x - 10) * Math.Sin((x * 10 - 10.75) * c4); - } - - public static double EaseOutElastic(float x) - { - double c4 = 2 * Math.PI / 3; - return x == 0 ? 0 : x == 1 ? 1 : Math.Pow(2, -10 * x) * Math.Sin((x * 10 - 0.75) * c4) + 1; - } - - public static double EaseInOutElastic(float x) - { - double c5 = 2 * Math.PI / 4.5; - return x == 0 ? 0 : - x == 1 ? 1 : - x < 0.5 ? -(Math.Pow(2, 20 * x - 10) * Math.Sin((20 * x - 11.125) * c5)) / 2 : - Math.Pow(2, -20 * x + 10) * Math.Sin((20 * x - 11.125) * c5) / 2 + 1; - } - - public static double EaseInBounce(float x) - { - return 1 - EaseOutBounce(1 - x); - } - - public static double EaseOutBounce(float x) - { - double n1 = 7.5625; - double d1 = 2.75; - - if (x < 1 / d1) - { - return n1 * x * x; - } - else if (x < 2 / d1) - { - return n1 * (x -= (float)(1.5 / d1)) * x + 0.75; - } - else if (x < 2.5 / d1) - { - return n1 * (x -= (float)(2.25 / d1)) * x + 0.9375; - } - else - { - return n1 * (x -= (float)(2.625 / d1)) * x + 0.984375; - } - } - - public static double EaseInOutBounce(float x) - { - return x < 0.5 ? (1 - EaseOutBounce(1 - 2 * x)) / 2 : (1 + EaseOutBounce(2 * x - 1)) / 2; - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/EaseUtil.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/EaseUtil.cs.meta deleted file mode 100644 index 3b13f5e..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/EaseUtil.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d42e2db77425447490cb9f68003e818b -timeCreated: 1741771999 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout.meta deleted file mode 100644 index 52779f5..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c2c36f0a0862000438099a52b9b5e69c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/AlignableLinearLayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/AlignableLinearLayoutManager.cs deleted file mode 100644 index 457dafa..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/AlignableLinearLayoutManager.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - [Serializable] - public class AlignableLinearLayoutManager : LinearLayoutManager - { - [SerializeField] private float alignmentCount = 0f; // 对齐比例 (0=顶部, 1=底部, 0.5=居中) - - public override Vector2 CalculatePosition(int index) - { - float position; - - if (direction == Direction.Vertical) - { - position = index * (lineHeight + spacing.y) - ScrollPosition ; - return new Vector2(0, position + padding.y); - } - - position = index * (lineHeight + spacing.x) - ScrollPosition ; - var a = new Vector2(position + padding.x, 0); - return a; - } - - public override float IndexToPosition(int index) - { - if (index < 0 || index >= adapter.GetItemCount()) return 0; - - float len, viewLength, position; - - if (direction == Direction.Vertical) - { - len = index * (lineHeight + spacing.y) - ((lineHeight + spacing.y) * alignmentCount); - viewLength = viewportSize.y; - position = len + viewLength > contentSize.y ? contentSize.y - viewportSize.y : len; - } - else - { - len = index * (lineHeight + spacing.x); - viewLength = viewportSize.x; - position = len + viewLength > contentSize.x ? contentSize.x - viewportSize.x : len; - } - - return position; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/AlignableLinearLayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/AlignableLinearLayoutManager.cs.meta deleted file mode 100644 index 12a94a1..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/AlignableLinearLayoutManager.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: e5cb3f76e0f84a7aa75959e194f524b5 -timeCreated: 1748588163 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/CircleLayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/CircleLayoutManager.cs deleted file mode 100644 index 341d533..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/CircleLayoutManager.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - public class CircleLayoutManager : LayoutManager - { - private float radius; - private float intervalAngle; - - private new CircleDirection direction; - [SerializeField] - private float initalAngle; - - - public CircleLayoutManager(CircleDirection direction = CircleDirection.Positive) - { - this.direction = direction; - } - - public CircleLayoutManager() - { - } - - public override Vector2 CalculateContentSize() - { - Vector2 size = viewProvider.CalculateViewSize(0); - radius = (Mathf.Min(viewportSize.x, viewportSize.y) - Mathf.Min(size.x, size.y)) / 2f - Mathf.Max(padding.x, padding.y); - intervalAngle = adapter.GetItemCount() > 0 ? 360f / adapter.GetItemCount() : 0; - - return viewportSize; - } - - public override Vector2 CalculateContentOffset() - { - return Vector2.zero; - } - - public override Vector2 CalculateViewportOffset() - { - return Vector2.zero; - } - - public override void Layout(ViewHolder viewHolder, int index) - { - viewHolder.RectTransform.anchoredPosition3D = CalculatePosition(index); - } - - public override Vector2 CalculatePosition(int index) - { - float angle = index * intervalAngle; - angle = direction == CircleDirection.Positive ? angle : -angle; - angle += initalAngle + ScrollPosition; - float radian = angle * (Mathf.PI / 180f); - float x = radius * Mathf.Sin(radian); - float y = radius * Mathf.Cos(radian); - - return new Vector2(x, y); - } - - public override int GetStartIndex() - { - return 0; - } - - public override int GetEndIndex() - { - return adapter.GetItemCount() - 1; - } - - public override bool IsFullVisibleStart(int index) => false; - - public override bool IsFullInvisibleStart(int index) => false; - - public override bool IsFullVisibleEnd(int index) => false; - - public override bool IsFullInvisibleEnd(int index) => false; - - public override bool IsVisible(int index) => true; - - public override float IndexToPosition(int index) - { - float position = index * intervalAngle; - - return -position; - } - - public override int PositionToIndex(float position) - { - int index = Mathf.RoundToInt(position / intervalAngle); - return -index; - } - - public override void DoItemAnimation() - { - List viewHolders = viewProvider.ViewHolders; - for (int i = 0; i < viewHolders.Count; i++) - { - float angle = i * intervalAngle + initalAngle; - angle = direction == CircleDirection.Positive ? angle + ScrollPosition : angle - ScrollPosition; - float delta = (angle - initalAngle) % 360; - delta = delta < 0 ? delta + 360 : delta; - delta = delta > 180 ? 360 - delta : delta; - float scale = delta < intervalAngle ? (1.4f - delta / intervalAngle) : 1; - scale = Mathf.Max(scale, 1); - - viewHolders[i].RectTransform.localScale = Vector3.one * scale; - } - } - } - - public enum CircleDirection - { - Positive, - Negative - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/CircleLayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/CircleLayoutManager.cs.meta deleted file mode 100644 index 1a48c5d..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/CircleLayoutManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 158658be786595e46a209d2b2162b4e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/GridLayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/GridLayoutManager.cs deleted file mode 100644 index 2b22e4c..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/GridLayoutManager.cs +++ /dev/null @@ -1,131 +0,0 @@ -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - public class GridLayoutManager : LayoutManager - { - private Vector2 cellSize; - - public GridLayoutManager() - { - - } - - public GridLayoutManager(int unit = 1) - { - this.unit = unit; - } - - public override Vector2 CalculateContentSize() - { - cellSize = viewProvider.CalculateViewSize(0); - - int row = Mathf.CeilToInt(adapter.GetItemCount() / (float)unit); - float len; - if (direction == Direction.Vertical) - { - len = row * (cellSize.y + spacing.y) - spacing.y; - return new Vector2(contentSize.x, len + padding.y * 2); - } - - len = row * (cellSize.x + spacing.x) - spacing.x; - return new Vector2(len, contentSize.y + padding.x * 2); - } - - public override Vector2 CalculatePosition(int index) - { - int row = index / unit; - int column = index % unit; - float x, y; - if (direction == Direction.Vertical) - { - x = column * (cellSize.x + spacing.x); - y = row * (cellSize.y + spacing.y) - ScrollPosition; - } - else - { - x = row * (cellSize.x + spacing.x) - ScrollPosition; - y = column * (cellSize.y + spacing.y); - } - - return new Vector2(x + padding.x, y + padding.y); - } - - public override Vector2 CalculateContentOffset() - { - float width, height; - if (alignment == Alignment.Center) - { - width = Mathf.Min(contentSize.x, viewportSize.x); - height = Mathf.Min(contentSize.y, viewportSize.y); - } - else - { - width = viewportSize.x; - height = viewportSize.y; - } - - return new Vector2((width - cellSize.x) / 2, (height - cellSize.y) / 2); - } - - public override Vector2 CalculateViewportOffset() - { - float width, height; - if (alignment == Alignment.Center) - { - width = Mathf.Min(contentSize.x, viewportSize.x); - height = Mathf.Min(contentSize.y, viewportSize.y); - } - else - { - width = viewportSize.x; - height = viewportSize.y; - } - - return new Vector2((width - cellSize.x) / 2, (height - cellSize.y) / 2); - } - - public override int GetStartIndex() - { - float len = direction == Direction.Vertical ? cellSize.y + spacing.y : cellSize.x + spacing.x; - int index = Mathf.FloorToInt(ScrollPosition / len) * unit; - return Mathf.Max(0, index); - } - - public override int GetEndIndex() - { - float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x; - float len = direction == Direction.Vertical ? cellSize.y + spacing.y : cellSize.x + spacing.x; - int index = Mathf.FloorToInt((ScrollPosition + viewLength) / len) * unit; - return Mathf.Min(index, adapter.GetItemCount() - 1); - } - - public override float IndexToPosition(int index) - { - int row = index / unit; - float len, viewLength, position; - if (direction == Direction.Vertical) - { - len = row * (cellSize.y + spacing.y); - viewLength = viewportSize.y; - position = len + viewLength > contentSize.y ? contentSize.y - viewportSize.y : len; - } - else - { - len = row * (cellSize.x + spacing.x); - viewLength = viewportSize.x; - position = len + viewLength > contentSize.x ? contentSize.x - viewportSize.x : len; - } - - return position; - } - - public override int PositionToIndex(float position) - { - float len = direction == Direction.Vertical ? cellSize.y + spacing.y : cellSize.x + spacing.x; - int index = Mathf.RoundToInt(position / len); - - return index * unit; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/GridLayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/GridLayoutManager.cs.meta deleted file mode 100644 index 05ac471..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/GridLayoutManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e4f9a076f276cd4a8db0055fd37e220 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/ILayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/ILayoutManager.cs deleted file mode 100644 index 6cfd075..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/ILayoutManager.cs +++ /dev/null @@ -1,115 +0,0 @@ -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - public interface ILayoutManager - { - /// - /// 滚动时,刷新整个页面的布局 - /// - void UpdateLayout(); - - /// - /// 为 ViewHolder 设置布局 - /// - /// - /// - void Layout(ViewHolder viewHolder, int index); - - /// - /// 设置 Content 大小 - /// - void SetContentSize(); - - /// - /// 计算 Content 的大小 - /// - /// - Vector2 CalculateContentSize(); - - /// - /// 计算第 index 个 ViewHolder 到顶部的距离 - /// - /// - /// - Vector2 CalculatePosition(int index); - - /// - /// 计算 ViewHolder 相对于内容长度的偏移 - /// - /// - Vector2 CalculateContentOffset(); - - /// - /// 计算 ViewHolder 相对于视口的偏移 - /// - /// - Vector2 CalculateViewportOffset(); - - /// - /// 获取当前显示的第一个 ViewHolder 下标 - /// - /// - int GetStartIndex(); - - /// - /// 获取当前显示的最后一个 ViewHolder 下标 - /// - /// - int GetEndIndex(); - - /// - /// 数据下标转换成在布局中对应的位置 - /// - /// - /// - float IndexToPosition(int index); - - /// - /// 在布局中的位置转换成数据下标 - /// - /// - /// - int PositionToIndex(float position); - - /// - /// 滚动时,item 对应的动画 - /// - void DoItemAnimation(); - - /// - /// 判断第一个 ViewHolder 是否完全可见 - /// - /// 数据的真实下标 - /// - bool IsFullVisibleStart(int index); - - /// - /// 判断第一个 ViewHolder 是否完全不可见 - /// - /// 数据的真实下标 - /// - bool IsFullInvisibleStart(int index); - - /// - /// 判定最后一个 ViewHolder 是否完全可见 - /// - /// - /// - bool IsFullVisibleEnd(int index); - - /// - /// 判定最后一个 ViewHolder 是否完全不可见 - /// - /// - /// - bool IsFullInvisibleEnd(int index); - - /// - /// 判定第 index ViewHolder是否可见 - /// - /// - /// - bool IsVisible(int index); - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/ILayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/ILayoutManager.cs.meta deleted file mode 100644 index ee6af99..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/ILayoutManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 09e4099cf54916a41b7da73277ab988a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LayoutManager.cs deleted file mode 100644 index c2295af..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LayoutManager.cs +++ /dev/null @@ -1,248 +0,0 @@ -using System; -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - [Serializable] - public abstract class LayoutManager : ILayoutManager - { - protected Vector2 viewportSize; - - public Vector2 ViewportSize - { - get => viewportSize; - private set => viewportSize = value; - } - - protected Vector2 contentSize; - - public Vector2 ContentSize - { - get => contentSize; - private set => contentSize = value; - } - - protected Vector2 contentOffset; - - public Vector2 ContentOffset - { - get => contentOffset; - private set => contentOffset = value; - } - - protected Vector2 viewportOffset; - - public Vector2 ViewportOffset - { - get => viewportOffset; - private set => viewportOffset = value; - } - - protected IAdapter adapter; - - public IAdapter Adapter - { - get => adapter; - set => adapter = value; - } - - protected ViewProvider viewProvider; - - public ViewProvider ViewProvider - { - get => viewProvider; - set => viewProvider = value; - } - - protected RecyclerView recyclerView; - - public virtual RecyclerView RecyclerView - { - get => recyclerView; - set => recyclerView = value; - } - - protected Direction direction; - - public Direction Direction - { - get => direction; - set => direction = value; - } - - protected Alignment alignment; - - public Alignment Alignment - { - get => alignment; - set => alignment = value; - } - - protected Vector2 spacing; - - public Vector2 Spacing - { - get => spacing; - set => spacing = value; - } - - protected Vector2 padding; - - public Vector2 Padding - { - get => padding; - set => padding = value; - } - - protected int unit = 1; - - public int Unit - { - get => unit; - set => unit = value; - } - - protected bool canScroll; - - public bool CanScroll - { - get => canScroll; - set => canScroll = value; - } - - public float ScrollPosition => recyclerView.GetScrollPosition(); - - public LayoutManager() - { - } - - public void SetContentSize() - { - viewportSize = recyclerView.GetComponent().rect.size; - contentSize = CalculateContentSize(); - contentOffset = CalculateContentOffset(); - viewportOffset = CalculateViewportOffset(); - } - - public void UpdateLayout() - { - foreach (var viewHolder in viewProvider.ViewHolders) - { - Layout(viewHolder, viewHolder.Index); - } - } - - public virtual void Layout(ViewHolder viewHolder, int index) - { - Vector2 pos = CalculatePosition(index); - Vector3 position = direction == Direction.Vertical ? new Vector3(pos.x - contentOffset.x, -pos.y + contentOffset.y, 0) : new Vector3(pos.x - contentOffset.x, -pos.y + contentOffset.y, 0); - viewHolder.RectTransform.anchoredPosition3D = position; - } - - public abstract Vector2 CalculateContentSize(); - - public abstract Vector2 CalculatePosition(int index); - - public abstract Vector2 CalculateContentOffset(); - - public abstract Vector2 CalculateViewportOffset(); - - public abstract int GetStartIndex(); - - public abstract int GetEndIndex(); - - public abstract float IndexToPosition(int index); - - public abstract int PositionToIndex(float position); - - public virtual void DoItemAnimation() - { - } - - public virtual bool IsFullVisibleStart(int index) - { - Vector2 vector2 = CalculatePosition(index); - float position = direction == Direction.Vertical ? vector2.y : vector2.x; - return position + GetOffset() >= 0; - } - - public virtual bool IsFullInvisibleStart(int index) - { - Vector2 vector2 = CalculatePosition(index + unit); - float position = direction == Direction.Vertical ? vector2.y : vector2.x; - return position + GetOffset() < 0; - } - - public virtual bool IsFullVisibleEnd(int index) - { - Vector2 vector2 = CalculatePosition(index + unit); - float position = direction == Direction.Vertical ? vector2.y : vector2.x; - float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x; - return position + GetOffset() <= viewLength; - } - - public virtual bool IsFullInvisibleEnd(int index) - { - Vector2 vector2 = CalculatePosition(index); - float position = direction == Direction.Vertical ? vector2.y : vector2.x; - float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x; - return position + GetOffset() > viewLength; - } - - public virtual bool IsVisible(int index) - { - float position, viewLength; - viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x; - - Vector2 vector2 = CalculatePosition(index); - position = direction == Direction.Vertical ? vector2.y : vector2.x; - if (position + GetOffset() > 0 && position + GetOffset() <= viewLength) - { - return true; - } - - vector2 = CalculatePosition(index + unit); - position = direction == Direction.Vertical ? vector2.y : vector2.x; - if (position + GetOffset() > 0 && position + GetOffset() <= viewLength) - { - return true; - } - - return false; - } - - protected virtual float GetFitContentSize() - { - float len; - if (direction == Direction.Vertical) - { - len = alignment == Alignment.Center ? Mathf.Min(contentSize.y, viewportSize.y) : viewportSize.y; - } - else - { - len = alignment == Alignment.Center ? Mathf.Min(contentSize.x, viewportSize.x) : viewportSize.x; - } - - return len; - } - - protected virtual float GetOffset() - { - return direction == Direction.Vertical ? -contentOffset.y + viewportOffset.y : -contentOffset.x + viewportOffset.x; - } - } - - public enum Direction - { - Vertical, - Horizontal, - Custom, - } - - public enum Alignment - { - Left, - Center, - Top - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LayoutManager.cs.meta deleted file mode 100644 index 396c4ac..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LayoutManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 959827c7e00900b47844bd9482d829ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LinearLayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LinearLayoutManager.cs deleted file mode 100644 index eef057f..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LinearLayoutManager.cs +++ /dev/null @@ -1,108 +0,0 @@ -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - public class LinearLayoutManager : LayoutManager - { - protected float lineHeight; - - public LinearLayoutManager() - { - } - - public override Vector2 CalculateContentSize() - { - Vector2 size = viewProvider.CalculateViewSize(0); - lineHeight = direction == Direction.Vertical ? size.y : size.x; - - int index = adapter.GetItemCount(); - float position; - if (direction == Direction.Vertical) - { - position = index * (lineHeight + spacing.y) - spacing.y; - return new Vector2(contentSize.x, position + padding.y * 2); - } - - position = index * (lineHeight + spacing.x) - spacing.x; - return new Vector2(position + padding.x * 2, contentSize.y); - } - - public override Vector2 CalculatePosition(int index) - { - float position; - if (direction == Direction.Vertical) - { - position = index * (lineHeight + spacing.y) - ScrollPosition; - return new Vector2(0, position + padding.y); - } - - position = index * (lineHeight + spacing.x) - ScrollPosition; - return new Vector2(position + padding.x, 0); - } - - public override Vector2 CalculateContentOffset() - { - float len = GetFitContentSize(); - if (direction == Direction.Vertical) - { - return new Vector2(0, (len - lineHeight) / 2); - } - - return new Vector2((len - lineHeight) / 2, 0); - } - - public override Vector2 CalculateViewportOffset() - { - if (direction == Direction.Vertical) - { - return new Vector2(0, (viewportSize.y - lineHeight) / 2); - } - - return new Vector2((viewportSize.x - lineHeight) / 2, 0); - } - - public override int GetStartIndex() - { - float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x; - int index = Mathf.FloorToInt(ScrollPosition / len); - return Mathf.Max(0, index); - } - - public override int GetEndIndex() - { - float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x; - float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x; - int index = Mathf.FloorToInt((ScrollPosition + viewLength) / len); - return Mathf.Min(index, adapter.GetItemCount() - 1); - } - - public override float IndexToPosition(int index) - { - if (index < 0 || index >= adapter.GetItemCount()) return 0; - - float len, viewLength, position; - if (direction == Direction.Vertical) - { - len = index * (lineHeight + spacing.y); - viewLength = viewportSize.y; - position = len + viewLength > contentSize.y ? contentSize.y - viewportSize.y : len; - } - else - { - len = index * (lineHeight + spacing.x); - viewLength = viewportSize.x; - position = len + viewLength > contentSize.x ? contentSize.x - viewportSize.x : len; - } - - return position; - } - - public override int PositionToIndex(float position) - { - float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x; - int index = Mathf.RoundToInt(position / len); - - return index; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LinearLayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LinearLayoutManager.cs.meta deleted file mode 100644 index 7f27d73..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/LinearLayoutManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 36d9270c4a025694397715d3c16cde7e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/MixedLayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/MixedLayoutManager.cs deleted file mode 100644 index 4230c20..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/MixedLayoutManager.cs +++ /dev/null @@ -1,136 +0,0 @@ -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - public class MixedLayoutManager : LayoutManager - { - public MixedLayoutManager() { } - - public override Vector2 CalculateContentSize() - { - int index = adapter.GetItemCount(); - float position = 0; - for (int i = 0; i < index; i++) - { - position += GetLength(i); - } - - return direction == Direction.Vertical ? - new Vector2(contentSize.x, position - spacing.y + padding.y * 2) : - new Vector2(position - spacing.x + padding.x * 2, contentSize.y); - } - - public override Vector2 CalculatePosition(int index) - { - // TODO 优化点,将 position 定义成全局变量 - float position = 0; - for (int i = 0; i < index; i++) - { - position += GetLength(i); - } - position -= ScrollPosition; - return direction == Direction.Vertical ? new Vector2(0, position + padding.y) : new Vector2(position + padding.x, 0); - } - - public override Vector2 CalculateContentOffset() - { - Vector2 size = viewProvider.CalculateViewSize(0); - float len = GetFitContentSize(); - if (direction == Direction.Vertical) - { - return new Vector2(0, (len - size.y) / 2); - } - return new Vector2((len - size.x) / 2, 0); - } - - public override Vector2 CalculateViewportOffset() - { - Vector2 size = viewProvider.CalculateViewSize(0); - if (direction == Direction.Vertical) - { - return new Vector2(0, (viewportSize.y - size.y) / 2); - } - return new Vector2((viewportSize.x - size.x) / 2, 0); - } - - public override int GetStartIndex() - { - float position = 0; - float contentPosition = ScrollPosition; - int itemCount = adapter.GetItemCount(); - for (int i = 0; i < itemCount; i++) - { - position += GetLength(i); - - if (position > contentPosition) - { - return Mathf.Max(0, i); - } - } - return 0; - } - - public override int GetEndIndex() - { - float position = 0; - float viewLength = direction == Direction.Vertical ? viewportSize.y : viewportSize.x; - int itemCount = adapter.GetItemCount(); - for (int i = 0; i < itemCount; i++) - { - position += GetLength(i); - - if (position > ScrollPosition + viewLength) - { - return Mathf.Min(i, adapter.GetItemCount() - 1); ; - } - } - return itemCount - 1; - } - - private float GetLength(int index) - { - Vector2 size = viewProvider.CalculateViewSize(index); - if (index < adapter.GetItemCount() - 1) - { - size += spacing; - } - float len = direction == Direction.Vertical ? size.y : size.x; - return len; - } - - public override float IndexToPosition(int index) - { - Vector2 position = CalculatePosition(index); - if (direction == Direction.Vertical) - { - position.y = Mathf.Max(0, position.y); - position.y = Mathf.Min(position.y, contentSize.y - viewportSize.y); - return position.y; - } - else - { - position.x = Mathf.Max(0, position.x); - position.x = Mathf.Min(position.x, contentSize.x - viewportSize.x); - return position.x; - } - } - - public override int PositionToIndex(float position) - { - float len = 0; - - int itemCount = adapter.GetItemCount(); - for (int i = 0; i < itemCount; i++) - { - len += GetLength(i); - - if (len >= position) - { - return i; - } - } - - return 0; - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/MixedLayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/MixedLayoutManager.cs.meta deleted file mode 100644 index e3b553f..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/MixedLayoutManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d296ceb3ab7786f43a94281a728d5205 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/PageLayoutManager.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/PageLayoutManager.cs deleted file mode 100644 index c7cada9..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/PageLayoutManager.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - public class PageLayoutManager : LinearLayoutManager - { - [SerializeField] - private float minScale; - - public PageLayoutManager() - { - } - - public override Vector2 CalculateContentSize() - { - Vector2 size = viewProvider.CalculateViewSize(0); - lineHeight = direction == Direction.Vertical ? size.y : size.x; - - int index = adapter.GetItemCount(); - float position; - if (direction == Direction.Vertical) - { - position = index * (lineHeight + spacing.y) - spacing.y; - position += viewportSize.y - lineHeight; - return new Vector2(contentSize.x, position + padding.y * 2); - } - - position = index * (lineHeight + spacing.x) - spacing.x; - position += viewportSize.x - lineHeight; - return new Vector2(position + padding.x * 2, contentSize.y); - } - - public override Vector2 CalculatePosition(int index) - { - float position; - if (direction == Direction.Vertical) - { - position = index * (lineHeight + spacing.y) - ScrollPosition; - return new Vector2(0, position + padding.y); - } - - position = index * (lineHeight + spacing.x) - ScrollPosition; - return new Vector2(position + padding.x, 0); - } - - public override Vector2 CalculateContentOffset() - { - return Vector2.zero; - } - - public override Vector2 CalculateViewportOffset() - { - return Vector2.zero; - } - - protected override float GetOffset() - { - float offset = direction == Direction.Vertical ? viewportSize.y - lineHeight : viewportSize.x - lineHeight; - return offset / 2; - } - - public override int PositionToIndex(float position) - { - float len = direction == Direction.Vertical ? lineHeight + spacing.y : lineHeight + spacing.x; - float pos = IndexToPosition(recyclerView.CurrentIndex); - // 根据是前划还是后划,来加减偏移量 - int index = position > pos ? Mathf.RoundToInt(position / len + 0.25f) : Mathf.RoundToInt(position / len - 0.25f); - - return index; - } - - public override void DoItemAnimation() - { - List viewHolders = viewProvider.ViewHolders; - for (int i = 0; i < viewHolders.Count; i++) - { - float viewPos = direction == Direction.Vertical ? -viewHolders[i].RectTransform.anchoredPosition.y : viewHolders[i].RectTransform.anchoredPosition.x; - float scale = 1 - Mathf.Min(Mathf.Abs(viewPos) * 0.0006f, 1f); - scale = Mathf.Max(scale, minScale); - - viewHolders[i].RectTransform.localScale = Vector3.one * scale; - } - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/PageLayoutManager.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/PageLayoutManager.cs.meta deleted file mode 100644 index 718aa4b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Layout/PageLayoutManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4fccdae6dae870c42bc27f435a94e621 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool.meta deleted file mode 100644 index 2e7ac88..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 3a9bb27da68d4451a7d79cdb7abc1506 -timeCreated: 1748431180 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectFactory.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectFactory.cs deleted file mode 100644 index 918803a..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectFactory.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace SimpleObjectPool -{ - - - internal interface IMixedObjectFactory where T : class - { - T Create(string typeName); - - void Destroy(string typeName, T obj); - - void Reset(string typeName, T obj); - - bool Validate(string typeName, T obj); - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectFactory.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectFactory.cs.meta deleted file mode 100644 index 9fcb864..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 30f89ee61eb3f0949b5300bd9b7cc577 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectPool.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectPool.cs deleted file mode 100644 index d182123..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectPool.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace SimpleObjectPool -{ - using System; - - internal interface IMixedObjectPool : IDisposable where T : class - { - T Allocate(string typeName); - - void Free(string typeName, T obj); - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectPool.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectPool.cs.meta deleted file mode 100644 index 209e188..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IMixedObjectPool.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3f4c13a4827ebad4a9ff08e636fbc67e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectFactory.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectFactory.cs deleted file mode 100644 index 06271e9..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectFactory.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace SimpleObjectPool -{ - - - internal interface IObjectFactory where T : class - { - /// - /// 创建对象 - /// - /// - T Create(); - - /// - /// 销毁对象 - /// - /// - void Destroy(T obj); - - /// - /// 重置对象 - /// - /// - void Reset(T obj); - - /// - /// 验证对象 - /// - /// - /// - bool Validate(T obj); - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectFactory.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectFactory.cs.meta deleted file mode 100644 index 0e5fc88..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 77a642084db01624c8e5876605195d49 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectPool.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectPool.cs deleted file mode 100644 index bf0abe0..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectPool.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace SimpleObjectPool -{ - using System; - - internal interface IObjectPool : IDisposable - { - /// - /// 从池子中分配一个可用对象,没有的话就创建一个 - /// - /// - object Allocate(); - - /// - /// 将对象回收到池子中去,如果池中的对象数量已经超过了 maxSize,则直接销毁该对象 - /// - /// - void Free(object obj); - } - - internal interface IObjectPool : IObjectPool, IDisposable where T : class - { - new T Allocate(); - - void Free(T obj); - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectPool.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectPool.cs.meta deleted file mode 100644 index 5debf3d..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IObjectPool.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dd12164a5eea20e41bf7f3b7704f4b33 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IPooledObject.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IPooledObject.cs deleted file mode 100644 index f9d5e56..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IPooledObject.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace SimpleObjectPool -{ - - - internal interface IPooledObject - { - void Free(); - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IPooledObject.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IPooledObject.cs.meta deleted file mode 100644 index ee50c4b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/IPooledObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b174ccb64b3938c449d4a69a3262d8d5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/MixedObjectPool.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/MixedObjectPool.cs deleted file mode 100644 index 2c88f2d..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/MixedObjectPool.cs +++ /dev/null @@ -1,108 +0,0 @@ -namespace SimpleObjectPool -{ - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - - internal class MixedObjectPool : IMixedObjectPool where T : class - { - private const int DEFAULT_MAX_SIZE_PER_TYPE = 10; - - private readonly ConcurrentDictionary> entries; - private readonly ConcurrentDictionary typeSize; - private readonly IMixedObjectFactory factory; - - private int defaultMaxSizePerType; - - public MixedObjectPool(IMixedObjectFactory factory) : this(factory, DEFAULT_MAX_SIZE_PER_TYPE) - { - } - - public MixedObjectPool(IMixedObjectFactory factory, int defaultMaxSizePerType) - { - this.factory = factory; - this.defaultMaxSizePerType = defaultMaxSizePerType; - - if (defaultMaxSizePerType <= 0) - { - throw new ArgumentException("The maxSize must be greater than 0."); - } - - entries = new ConcurrentDictionary>(); - typeSize = new ConcurrentDictionary(); - } - - public T Allocate(string typeName) - { - if (entries.TryGetValue(typeName, out List list) && list.Count > 0) - { - T obj = list[0]; - list.RemoveAt(0); - return obj; - } - - return factory.Create(typeName); - } - - public void Free(string typeName, T obj) - { - if (obj == null) return; - - if (!factory.Validate(typeName, obj)) - { - factory.Destroy(typeName, obj); - return; - } - - int maxSize = GetMaxSize(typeName); - List list = entries.GetOrAdd(typeName, n => new List()); - if (list.Count >= maxSize) - { - factory.Destroy(typeName, obj); - return; - } - - factory.Reset(typeName, obj); - list.Add(obj); - } - - public int GetMaxSize(string typeName) - { - if (typeSize.TryGetValue(typeName, out int size)) - { - return size; - } - - return defaultMaxSizePerType; - } - - public void SetMaxSize(string typeName, int value) - { - typeSize.AddOrUpdate(typeName, value, (key, oldValue) => value); - } - - protected virtual void Clear() - { - foreach (var kv in entries) - { - string typeName = kv.Key; - List list = kv.Value; - - if (list == null || list.Count <= 0) continue; - - list.ForEach(e => factory.Destroy(typeName, e)); - list.Clear(); - } - - entries.Clear(); - typeSize.Clear(); - } - - public void Dispose() - { - Clear(); - GC.SuppressFinalize(this); - } - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/MixedObjectPool.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/MixedObjectPool.cs.meta deleted file mode 100644 index 5af2b10..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/MixedObjectPool.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0a62e68f43eac4b419140191eb09ea56 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/ObjectPool.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/ObjectPool.cs deleted file mode 100644 index 483487b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/ObjectPool.cs +++ /dev/null @@ -1,112 +0,0 @@ -namespace SimpleObjectPool -{ - using System; - using System.Threading; - - internal class ObjectPool : IObjectPool where T : class - { - private int maxSize; - private int initialSize; - protected readonly T[] entries = null; - protected readonly IObjectFactory factory; - - public ObjectPool(IObjectFactory factory) : this(factory, Environment.ProcessorCount * 2) - { - } - - public ObjectPool(IObjectFactory factory, int maxSize) : this(factory, 0, maxSize) - { - } - - public ObjectPool(IObjectFactory factory, int initialSize, int maxSize) - { - this.factory = factory; - this.initialSize = initialSize; - this.maxSize = maxSize; - this.entries = new T[maxSize]; - - if (maxSize < initialSize) - { - throw new ArgumentException("The maxSize must be greater than or equal to the initialSize."); - } - - for (int i = 0; i < initialSize; i++) - { - entries[i] = factory.Create(); - } - } - - public int MaxSize => maxSize; - - public int InitialSize => initialSize; - - public virtual T Allocate() - { - for (var i = 0; i < entries.Length; i++) - { - T value = entries[i]; - if (value == null) continue; - - if (Interlocked.CompareExchange(ref entries[i], null, value) == value) - { - return value; - } - } - - return factory.Create(); - } - - public virtual void Free(T obj) - { - if (obj == null) return; - - if (!factory.Validate(obj)) - { - factory.Destroy(obj); - return; - } - - factory.Reset(obj); - - for (var i = 0; i < entries.Length; i++) - { - if (Interlocked.CompareExchange(ref entries[i], obj, null) == null) - { - return; - } - } - - factory.Destroy(obj); - } - - object IObjectPool.Allocate() - { - return Allocate(); - } - - public void Free(object obj) - { - Free((T)obj); - } - - protected virtual void Clear() - { - for (var i = 0; i < entries.Length; i++) - { - var value = Interlocked.Exchange(ref entries[i], null); - - if (value != null) - { - factory.Destroy(value); - } - } - } - - public void Dispose() - { - Clear(); - GC.SuppressFinalize(this); - } - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/ObjectPool.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/ObjectPool.cs.meta deleted file mode 100644 index 543d2f4..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/ObjectPool.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 30999e5e03e2b434996100b09960468f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityComponentFactory.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityComponentFactory.cs deleted file mode 100644 index 25fa23d..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityComponentFactory.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace SimpleObjectPool -{ - using UnityEngine; - - internal class UnityComponentFactory : IObjectFactory where T : Component - { - private T template; - private Transform parent; - - public UnityComponentFactory(T template, Transform parent) - { - this.template = template; - this.parent = parent; - } - - public T Create() - { - T obj = Object.Instantiate(template, parent); - return obj; - } - - public void Destroy(T obj) - { - Object.Destroy(obj.gameObject); - } - - public void Reset(T obj) - { - obj.gameObject.SetActive(false); - obj.gameObject.transform.position = Vector3.zero; - obj.gameObject.transform.rotation = Quaternion.identity; - } - - public bool Validate(T obj) - { - return true; - } - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityComponentFactory.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityComponentFactory.cs.meta deleted file mode 100644 index 956f9ab..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityComponentFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3e2e3a0444783a7469d494ad630dc705 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityGameObjectFactory.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityGameObjectFactory.cs deleted file mode 100644 index 45043f3..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityGameObjectFactory.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace SimpleObjectPool -{ - using UnityEngine; - - internal class UnityGameObjectFactory : IObjectFactory - { - protected GameObject template; - protected Transform parent; - - public UnityGameObjectFactory(GameObject template, Transform parent) - { - this.template = template; - this.parent = parent; - } - - public virtual GameObject Create() - { - return Object.Instantiate(template, parent); - } - - public virtual void Reset(GameObject obj) - { - obj.SetActive(false); - obj.transform.position = Vector3.zero; - obj.transform.rotation = Quaternion.identity; - } - - public virtual void Destroy(GameObject obj) - { - Object.Destroy(obj); - } - - public virtual bool Validate(GameObject obj) - { - return true; - } - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityGameObjectFactory.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityGameObjectFactory.cs.meta deleted file mode 100644 index f77bddc..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityGameObjectFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7373bce96f2a515499c52b060ad9e01e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedComponentFactory.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedComponentFactory.cs deleted file mode 100644 index 1e73bad..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedComponentFactory.cs +++ /dev/null @@ -1,65 +0,0 @@ -namespace SimpleObjectPool -{ - using System.Collections; - using System.Collections.Generic; - using UnityEngine; - - internal class UnityMixedComponentFactory : IMixedObjectFactory where T : Component - { - protected T template; - protected Transform parent; - protected List list; - - private Dictionary dict = new(); - - public UnityMixedComponentFactory(T template, Transform parent) - { - this.template = template; - this.parent = parent; - } - - public UnityMixedComponentFactory(List list, Transform parent) - { - this.list = list; - this.parent = parent; - - foreach (var data in list) - { - dict[data.name] = data; - } - } - - public UnityMixedComponentFactory(Dictionary dict, Transform parent) - { - this.dict = dict; - this.parent = parent; - } - - public T Create(string typeName) - { - T obj = Object.Instantiate(dict[typeName], parent); - obj.transform.position = Vector3.zero; - obj.transform.rotation = Quaternion.identity; - - return obj; - } - - public void Destroy(string typeName, T obj) - { - Object.Destroy(obj.gameObject); - } - - public void Reset(string typeName, T obj) - { - obj.gameObject.SetActive(false); - obj.transform.position = Vector3.zero; - obj.transform.rotation = Quaternion.identity; - } - - public bool Validate(string typeName, T obj) - { - return true; - } - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedComponentFactory.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedComponentFactory.cs.meta deleted file mode 100644 index 19b9f96..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedComponentFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c2d58d006be3fc458b8c6761d76bc88 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedGameObjectFactory.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedGameObjectFactory.cs deleted file mode 100644 index 56745e6..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedGameObjectFactory.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace SimpleObjectPool -{ - using UnityEngine; - - internal class UnityMixedGameObjectFactory : IMixedObjectFactory - { - protected GameObject template; - protected Transform parent; - - public UnityMixedGameObjectFactory(GameObject template, Transform parent) - { - this.template = template; - this.parent = parent; - } - - public GameObject Create(string typeName) - { - GameObject obj = Object.Instantiate(template, parent); - GameObject model = Object.Instantiate(Resources.Load("ObjectPools/" + typeName), obj.transform); - model.transform.position = Vector3.zero; - model.transform.rotation = Quaternion.identity; - - return obj; - } - - public void Destroy(string typeName, GameObject obj) - { - Object.Destroy(obj); - } - - public void Reset(string typeName, GameObject obj) - { - obj.SetActive(false); - obj.transform.position = Vector3.zero; - obj.transform.rotation = Quaternion.identity; - } - - public bool Validate(string typeName, GameObject obj) - { - return true; - } - } - -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedGameObjectFactory.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedGameObjectFactory.cs.meta deleted file mode 100644 index 4f53e07..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ObjectPool/UnityMixedGameObjectFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 16c8995b85215c6458119d581eea60b0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/RecyclerView.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/RecyclerView.cs deleted file mode 100644 index ec247d7..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/RecyclerView.cs +++ /dev/null @@ -1,383 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.Serialization; -using UnityEngine.UI; - -namespace AlicizaX.UI.RecyclerView -{ - public class RecyclerView : MonoBehaviour - { - [SerializeField] private Direction direction; - - public Direction Direction - { - get => direction; - set => direction = value; - } - - [SerializeField] private Alignment alignment; - - public Alignment Alignment - { - get => alignment; - set => alignment = value; - } - - [SerializeField] private RectTransform content; - - public RectTransform Content - { - get - { - if (content == null) - { - content = transform.GetChild(0).GetComponent(); - } - - return content; - } - } - - [SerializeField] private Vector2 spacing; - - public Vector2 Spacing - { - get => spacing; - set => spacing = value; - } - - [SerializeField] private Vector2 padding; - - public Vector2 Padding - { - get => padding; - set => padding = value; - } - - [SerializeField] private bool scroll; - - public bool Scroll - { - get => scroll; - set => scroll = value; - } - - [SerializeField] private bool snap; - - public bool Snap - { - get => snap; - set => snap = value & scroll; - } - - [SerializeField, Range(1f, 50f)] private float scrollSpeed = 7f; - - public float ScrollSpeed - { - get => scrollSpeed; - set => scrollSpeed = value; - } - - [SerializeField, Range(10f, 50f)] private float wheelSpeed = 30f; - - public float WheeelSpeed - { - get => wheelSpeed; - set => wheelSpeed = value; - } - - [SerializeField] private ViewHolder[] templates; - - public ViewHolder[] Templates - { - get => templates; - set => templates = value; - } - - - [SerializeField] private string _scrollerTypeName; - - [SerializeReference] private Scroller _scroller; - - [SerializeField] private bool _showScrollBar; - [SerializeReference] private Scrollbar _scrollbar; - - - private ViewProvider viewProvider; - - [SerializeField] private string _layoutManagerTypeName; - - [SerializeReference] private LayoutManager _layoutManager; - - - private int startIndex, endIndex; - private int currentIndex; - - public Scroller Scroller => _scroller; - - public int CurrentIndex - { - get => currentIndex; - } - - public bool CanScroll => true; - - - public ViewProvider ViewProvider - { - get - { - viewProvider ??= templates.Length > 1 ? new MixedViewProvider(this, templates) : new SimpleViewProvider(this, templates); - return viewProvider; - } - } - - - public Scrollbar Scrollbar => _scrollbar; - - private IAdapter _adapter; - - public LayoutManager LayoutManager => _layoutManager; - - public Action OnIndexChanged; - public Action OnScrollValueChanged; - public Action OnMoveingChanged; - - private void OnValidate() - { - if (_scroller != null) - { - _scroller.ScrollSpeed = scrollSpeed; - _scroller.WheelSpeed = wheelSpeed; - } - } - - private void OnScrollChanged(float pos) - { - _layoutManager.UpdateLayout(); - - if (Scrollbar != null) - { - Scrollbar.SetValueWithoutNotify(pos / _scroller.MaxPosition); - } - - if (_layoutManager.IsFullInvisibleStart(startIndex)) - { - viewProvider.RemoveViewHolder(startIndex); - startIndex += _layoutManager.Unit; - } - else if (_layoutManager.IsFullVisibleStart(startIndex)) - { - if (startIndex == 0) - { - // TODO Do something, eg: Refresh - } - else - { - startIndex -= _layoutManager.Unit; - viewProvider.CreateViewHolder(startIndex); - } - } - - if (_layoutManager.IsFullInvisibleEnd(endIndex)) - { - viewProvider.RemoveViewHolder(endIndex); - endIndex -= _layoutManager.Unit; - } - else if (_layoutManager.IsFullVisibleEnd(endIndex)) - { - if (endIndex >= viewProvider.GetItemCount() - _layoutManager.Unit) - { - // TODO Do something, eg: Load More - } - else - { - endIndex += _layoutManager.Unit; - viewProvider.CreateViewHolder(endIndex); - } - } - - // 使用滚动条快速定位时,刷新整个列表 - if (!_layoutManager.IsVisible(startIndex) || !_layoutManager.IsVisible(endIndex)) - { - Refresh(); - } - - _layoutManager.DoItemAnimation(); - - OnScrollValueChanged?.Invoke(); - } - - private void OnMoveing() - { - OnMoveingChanged?.Invoke(); - } - - private void OnMoveStoped() - { - if (Snap) - { - SnapTo(); - } - } - - private void OnScrollbarChanged(float ratio) - { - _scroller.ScrollToRatio(ratio); - } - - private void OnScrollbarDragEnd() - { - if (_scroller.Position < _scroller.MaxPosition) - { - if (Snap) - { - SnapTo(); - } - } - } - - private void Awake() - { - for (int i = 0; i < templates.Length; i++) - { - templates[i].gameObject.SetActive(false); - } - - ConfigScroller(); - ConfigScrollbar(); - } - - private void OnDestroy() - { - viewProvider?.Dispose(); - } - - public void Reset() - { - viewProvider?.Reset(); - if (_scroller != null) - { - _scroller.Position = 0; - } - - if (_scrollbar != null) - { - _scrollbar.SetValueWithoutNotify(0); - } - } - - public void SetAdapter(IAdapter adapter) - { - _adapter = adapter; - ViewProvider.Adapter = _adapter; - ViewProvider.LayoutManager = _layoutManager; - ViewProvider.LayoutManager = _layoutManager; - _layoutManager.RecyclerView = this; - _layoutManager.Adapter = _adapter; - _layoutManager.ViewProvider = viewProvider; - _layoutManager.Direction = direction; - _layoutManager.Alignment = alignment; - _layoutManager.Spacing = spacing; - _layoutManager.Padding = padding; - _layoutManager.CanScroll = CanScroll; - } - - - private void ConfigScroller() - { - if (_scroller != null) - { - _scroller.ScrollSpeed = scrollSpeed; - _scroller.WheelSpeed = wheelSpeed; - _scroller.Snap = Snap; - _scroller.OnValueChanged.AddListener(OnScrollChanged); - _scroller.OnMoveStoped.AddListener(OnMoveStoped); - _scroller.OnMoveing.AddListener(OnMoveing); - } - } - - private void ConfigScrollbar() - { - if (_showScrollBar && _scrollbar != null) - { - _scrollbar.gameObject.SetActive(scroll); - _scrollbar.onValueChanged.AddListener(OnScrollbarChanged); - _scrollbar.gameObject.AddComponent().OnDragEnd = OnScrollbarDragEnd; - } - } - - public void Refresh() - { - ViewProvider.Clear(); - - startIndex = _layoutManager.GetStartIndex(); - endIndex = _layoutManager.GetEndIndex(); - for (int i = startIndex; i <= endIndex; i += _layoutManager.Unit) - { - ViewProvider.CreateViewHolder(i); - } - - _layoutManager.DoItemAnimation(); - } - - public void RequestLayout() - { - _layoutManager.SetContentSize(); - - if (_scroller == null) return; - - _scroller.Direction = direction; - _scroller.ViewSize = _layoutManager.ViewportSize; - _scroller.ContentSize = _layoutManager.ContentSize; - - if (Scrollbar != null && _scroller.ContentSize != Vector2.zero) - { - if ((direction == Direction.Vertical && _layoutManager.ContentSize.y <= _layoutManager.ViewportSize.y) || - (direction == Direction.Horizontal && _layoutManager.ContentSize.x <= _layoutManager.ViewportSize.x) || - (direction == Direction.Custom)) - { - Scrollbar.gameObject.SetActive(false); - } - else - { - Scrollbar.gameObject.SetActive(true); - Scrollbar.direction = direction == Direction.Vertical ? Scrollbar.Direction.TopToBottom : Scrollbar.Direction.LeftToRight; - Scrollbar.size = direction == Direction.Vertical ? _scroller.ViewSize.y / _scroller.ContentSize.y : _scroller.ViewSize.x / _scroller.ContentSize.x; - } - } - } - - public float GetScrollPosition() - { - return _scroller ? _scroller.Position : 0; - } - - public void ScrollTo(int index, bool smooth = false) - { - if (!scroll) return; - - _scroller.ScrollTo(_layoutManager.IndexToPosition(index), smooth); - if (!smooth) - { - Refresh(); - } - - index %= _adapter.GetItemCount(); - index = index < 0 ? _adapter.GetItemCount() + index : index; - - if (currentIndex != index) - { - currentIndex = index; - OnIndexChanged?.Invoke(currentIndex); - } - } - - - private void SnapTo() - { - var index = _layoutManager.PositionToIndex(GetScrollPosition()); - ScrollTo(index, true); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/RecyclerView.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/RecyclerView.cs.meta deleted file mode 100644 index 6bbf25a..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/RecyclerView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7efd8e83d2092b347952108134dc37eb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: a01ce47da31a2e0438fd8d38b203c0d5, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller.meta deleted file mode 100644 index 6dfaea3..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b79ba677d829b904794e3b4a09cb67c2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/CircleScroller.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/CircleScroller.cs deleted file mode 100644 index 7273e1e..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/CircleScroller.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace AlicizaX.UI.RecyclerView -{ - [Serializable] - public class CircleScroller : Scroller - { - private Vector2 centerPosition; - - private void Awake() - { - RectTransform rectTransform = GetComponent(); - Vector2 position = transform.position; - Vector2 size = rectTransform.sizeDelta; - - if (rectTransform.pivot.x == 0) - { - centerPosition.x = position.x + size.x / 2f; - } - else if (rectTransform.pivot.x == 0.5f) - { - centerPosition.x = position.x; - } - else - { - centerPosition.x = position.x - size.x / 2f; - } - - if (rectTransform.pivot.y == 0) - { - centerPosition.y = position.y + size.y / 2f; - } - else if (rectTransform.pivot.y == 0.5f) - { - centerPosition.y = position.y; - } - else - { - centerPosition.y = position.y - size.y / 2f; - } - } - - internal override float GetDelta(PointerEventData eventData) - { - float delta; - if (Mathf.Abs(eventData.delta.x) > Mathf.Abs(eventData.delta.y)) - { - delta = eventData.position.y > centerPosition.y ? eventData.delta.x : -eventData.delta.x; - } - else - { - delta = eventData.position.x < centerPosition.x ? eventData.delta.y : -eventData.delta.y; - } - return delta * 0.1f; - } - - protected override void Elastic() - { - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/CircleScroller.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/CircleScroller.cs.meta deleted file mode 100644 index 7b3cbd9..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/CircleScroller.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 85235544e637a4a4f93ad88a5cfdac0a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/IScroller.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/IScroller.cs deleted file mode 100644 index 83fa3a1..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/IScroller.cs +++ /dev/null @@ -1,27 +0,0 @@ -using UnityEngine.Events; - -namespace AlicizaX.UI.RecyclerView -{ - public interface IScroller - { - float Position { get; set; } - - void ScrollTo(float position, bool smooth = false); - } - - public class ScrollerEvent : UnityEvent - { - } - - public class MoveStopEvent : UnityEvent - { - } - - public class DraggingEvent : UnityEvent - { - } - - public class MoveingEvent : UnityEvent - { - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/IScroller.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/IScroller.cs.meta deleted file mode 100644 index 76227ac..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/IScroller.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3928a884003099344b231a9d554dc5da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/SAOScroller.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/SAOScroller.cs deleted file mode 100644 index 9ef05fd..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/SAOScroller.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.EventSystems; -using static UnityEngine.Mathf; - -namespace AlicizaX.UI.RecyclerView -{ - [Serializable] - public class SAOScroller : Scroller - { - - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/SAOScroller.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/SAOScroller.cs.meta deleted file mode 100644 index 19edfe7..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/SAOScroller.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 96b927c6a47e4c088e2fe9bdadd0fab9 -timeCreated: 1748589040 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/ScrollbarEx.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/ScrollbarEx.cs deleted file mode 100644 index f2266de..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/ScrollbarEx.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using PrimeTween; -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace AlicizaX.UI.RecyclerView -{ - public class ScrollbarEx : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IPointerEnterHandler, IPointerExitHandler - { - private RectTransform handle; - private Scrollbar scrollbar; - - public Action OnDragEnd; - - private bool dragging; - private bool hovering; - - private void Awake() - { - scrollbar = GetComponent(); - handle = scrollbar.handleRect; - } - - public void OnBeginDrag(PointerEventData eventData) - { - dragging = true; - } - - public void OnEndDrag(PointerEventData eventData) - { - dragging = false; - if (!hovering) - { - if (scrollbar.direction == Scrollbar.Direction.TopToBottom || - scrollbar.direction == Scrollbar.Direction.BottomToTop) - { - Tween.ScaleX(handle, 1f, 0.2f); - } - else - { - Tween.ScaleY(handle, 1f, 0.2f); - } - } - - OnDragEnd?.Invoke(); - } - - public void OnPointerEnter(PointerEventData eventData) - { - hovering = true; - if (scrollbar.direction == Scrollbar.Direction.TopToBottom || - scrollbar.direction == Scrollbar.Direction.BottomToTop) - { - Tween.ScaleX(handle, 2f, 0.2f); - } - else - { - Tween.ScaleY(handle, 2f, 0.2f); - } - } - - public void OnPointerExit(PointerEventData eventData) - { - hovering = false; - if (!dragging) - { - if (scrollbar.direction == Scrollbar.Direction.TopToBottom || - scrollbar.direction == Scrollbar.Direction.BottomToTop) - { - Tween.ScaleX(handle, 1f, 0.2f); - } - else - { - Tween.ScaleY(handle, 1f, 0.2f); - } - } - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/ScrollbarEx.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/ScrollbarEx.cs.meta deleted file mode 100644 index 5f0c2ad..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/ScrollbarEx.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 682cfe39b0fffe544be8d5c11eb369e5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/Scroller.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/Scroller.cs deleted file mode 100644 index 6d27bc9..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/Scroller.cs +++ /dev/null @@ -1,283 +0,0 @@ -using System; -using System.Collections; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace AlicizaX.UI.RecyclerView -{ - [Serializable] - public class Scroller : MonoBehaviour, IScroller, IBeginDragHandler, IEndDragHandler, IDragHandler, IScrollHandler - { - protected float position; - - public float Position - { - get => position; - set => position = value; - } - - protected float velocity; - public float Velocity => velocity; - - protected Direction direction; - - public Direction Direction - { - get => direction; - set => direction = value; - } - - /// - /// 内容所需要大小 - /// - protected Vector2 contentSize; - - public Vector2 ContentSize - { - get => contentSize; - set => contentSize = value; - } - - /// - /// 所在 View 的真实大小 - /// - protected Vector2 viewSize; - - public Vector2 ViewSize - { - get => viewSize; - set => viewSize = value; - } - - protected float scrollSpeed = 1f; - - public float ScrollSpeed - { - get => scrollSpeed; - set => scrollSpeed = value; - } - - protected float wheelSpeed = 30f; - - public float WheelSpeed - { - get => wheelSpeed; - set => wheelSpeed = value; - } - - protected bool snap; - - public bool Snap - { - get => snap; - set => snap = value; - } - - protected ScrollerEvent scrollerEvent = new(); - protected MoveStopEvent moveStopEvent = new(); - protected DraggingEvent draggingEvent = new(); - protected MoveingEvent moveingEvent = new(); - - public float MaxPosition => direction == Direction.Vertical ? Mathf.Max(contentSize.y - viewSize.y, 0) : Mathf.Max(contentSize.x - viewSize.x, 0); - - public float ViewLength => direction == Direction.Vertical ? viewSize.y : viewSize.x; - - public MoveingEvent OnMoveing - { - get => moveingEvent; - set => moveingEvent = value; - } - - public ScrollerEvent OnValueChanged - { - get => scrollerEvent; - set => scrollerEvent = value; - } - - public MoveStopEvent OnMoveStoped - { - get => moveStopEvent; - set => moveStopEvent = value; - } - - public DraggingEvent OnDragging - { - get => draggingEvent; - set => draggingEvent = value; - } - - // 停止滑动的时间,但此时并未释放鼠标按键 - private float dragStopTime = 0f; - - public virtual void ScrollTo(float position, bool smooth = false) - { - if (position == this.position) return; - - if (!smooth) - { - this.position = position; - OnValueChanged?.Invoke(this.position); - } - else - { - StopAllCoroutines(); - StartCoroutine(MoveTo(position)); - } - } - - public virtual void ScrollToRatio(float ratio) - { - ScrollTo(MaxPosition * ratio, false); - } - - public void OnBeginDrag(PointerEventData eventData) - { - OnDragging?.Invoke(true); - StopAllCoroutines(); - } - - public void OnEndDrag(PointerEventData eventData) - { - Inertia(); - Elastic(); - OnDragging?.Invoke(false); - } - - public void OnDrag(PointerEventData eventData) - { - dragStopTime = Time.time; - - velocity = GetDelta(eventData); - position += velocity; - - OnValueChanged?.Invoke(position); - OnMoveing?.Invoke(); - } - - public virtual void OnScrolled(PointerEventData eventData) - { - StopAllCoroutines(); - - float rate = GetScrollRate() * wheelSpeed; - velocity = direction == Direction.Vertical ? -eventData.scrollDelta.y * rate : eventData.scrollDelta.x * rate; - position += velocity; - - OnValueChanged?.Invoke(position); - OnMoveing?.Invoke(); - Elastic(); - } - - internal virtual float GetDelta(PointerEventData eventData) - { - float rate = GetScrollRate(); - return direction == Direction.Vertical ? eventData.delta.y * rate : -eventData.delta.x * rate; - } - - private float GetScrollRate() - { - float rate = 1f; - if (position < 0) - { - rate = Mathf.Max(0, 1 - (Mathf.Abs(position) / ViewLength)); - } - else if (position > MaxPosition) - { - rate = Mathf.Max(0, 1 - (Mathf.Abs(position - MaxPosition) / ViewLength)); - } - - return rate; - } - - /// - /// 松手时的惯性滑动 - /// - protected virtual void Inertia() - { - // 松手时的时间 离 停止滑动的时间 超过一定时间,则认为此次惯性滑动无效 - if (!snap && (Time.time - dragStopTime) > 0.01f) return; - - if (Mathf.Abs(velocity) > 0.1f) - { - StopAllCoroutines(); - StartCoroutine(InertiaTo()); - } - else - { - OnMoveStoped?.Invoke(); - } - } - - /// - /// 滑动到顶部/底部之后,松手时回弹 - /// - protected virtual void Elastic() - { - if (position < 0) - { - StopAllCoroutines(); - StartCoroutine(ElasticTo(0)); - } - else if (position > MaxPosition) - { - StopAllCoroutines(); - StartCoroutine(ElasticTo(MaxPosition)); - } - } - - IEnumerator InertiaTo() - { - float timer = 0f; - float p = position; - float v = velocity > 0 ? Mathf.Min(velocity, 100) : Mathf.Max(velocity, -100); - float duration = snap ? 0.1f : 1f; - while (timer < duration) - { - float y = (float)EaseUtil.EaseOutCirc(timer) * 40; - timer += Time.deltaTime; - position = p + y * v; - - Elastic(); - - OnValueChanged?.Invoke(position); - - yield return new WaitForEndOfFrame(); - } - - OnMoveStoped?.Invoke(); - } - - IEnumerator ElasticTo(float targetPos) - { - yield return ToPosition(targetPos, 7); - } - - IEnumerator MoveTo(float targetPos) - { - yield return ToPosition(targetPos, scrollSpeed); - } - - IEnumerator ToPosition(float targetPos, float speed) - { - float startPos = position; - float time = Time.deltaTime; - while (Mathf.Abs(targetPos - position) > 0.1f) - { - position = Mathf.Lerp(startPos, targetPos, time * speed); - OnValueChanged?.Invoke(position); - - time += Time.deltaTime; - - yield return new WaitForEndOfFrame(); - } - - position = targetPos; - OnValueChanged?.Invoke(position); - } - - - void IScrollHandler.OnScroll(PointerEventData eventData) - { - OnScrolled(eventData); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/Scroller.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/Scroller.cs.meta deleted file mode 100644 index d656bfc..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/Scroller/Scroller.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7b7de4cb3a1546e4a9ade6b8dbf8af92 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder.meta deleted file mode 100644 index a317212..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 194b0a1eb83729844850e1873dbc0118 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder/ViewHolder.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder/ViewHolder.cs deleted file mode 100644 index a022792..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder/ViewHolder.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using AlicizaX.UI.Extension; -using UnityEngine; -using UnityEngine.UI; - -namespace AlicizaX.UI.RecyclerView -{ - public abstract class ViewHolder : MonoBehaviour - { - private RectTransform rectTransform; - - public RectTransform RectTransform - { - get - { - if (rectTransform == null) - { - rectTransform = GetComponent(); - } - - return rectTransform; - } - private set { rectTransform = value; } - } - - public string Name { get; internal set; } - public int Index { get; internal set; } - - public bool ChoiseState { private set; get; } - - public Vector2 SizeDelta => RectTransform.sizeDelta; - private IButton _button; - - protected internal virtual void OnStart() - { - } - - protected internal virtual void OnRecycled() - { - } - - public abstract void BindViewData(T data); - - protected internal virtual void BindItemClick(T data, Action action) - { - if (_button is null && !TryGetComponent(out _button)) - { - Log.Warning("找不到Button组件"); - return; - } - - _button.onClick.RemoveAllListeners(); - _button.onClick.AddListener(() => action?.Invoke(data)); - } - - protected internal void BindChoiceState(bool state) - { - if (ChoiseState != state) - { - ChoiseState = state; - OnBindChoiceState(state); - } - } - - protected internal virtual void OnBindChoiceState(bool state) - { - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder/ViewHolder.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder/ViewHolder.cs.meta deleted file mode 100644 index c30a8e4..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewHolder/ViewHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9d43d46f3524d814fbb2fb2f03e3c610 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider.meta deleted file mode 100644 index e4f683f..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 789e3dbb330a44f42b73d50f128888e4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/MixedViewProvider.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/MixedViewProvider.cs deleted file mode 100644 index c33ab22..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/MixedViewProvider.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SimpleObjectPool; -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - public class MixedViewProvider : ViewProvider - { - [SerializeField] private ViewHolder chatLeftViewHolder; - [SerializeField] private ViewHolder chatRightViewHolder; - - private IMixedObjectPool objectPool; - private Dictionary dict = new(); - - public MixedViewProvider(RecyclerView recyclerView, ViewHolder[] templates) : base(recyclerView, templates) - { - foreach (var template in templates) - { - dict[template.name] = template; - } - - UnityMixedComponentFactory factory = new(dict, recyclerView.Content); - objectPool = new MixedObjectPool(factory); - } - - public override ViewHolder GetTemplate(string viewName) - { - if (templates == null || templates.Length == 0) - { - throw new NullReferenceException("ViewProvider templates can not null or empty."); - } - return dict[viewName]; - } - - public override ViewHolder[] GetTemplates() - { - if (templates == null || templates.Length == 0) - { - throw new NullReferenceException("ViewProvider templates can not null or empty."); - } - return dict.Values.ToArray(); - } - - public override ViewHolder Allocate(string viewName) - { - var viewHolder = objectPool.Allocate(viewName); - viewHolder.gameObject.SetActive(true); - return viewHolder; - } - - public override void Free(string viewName, ViewHolder viewHolder) - { - objectPool.Free(viewName, viewHolder); - } - - public override void Reset() - { - Clear(); - objectPool.Dispose(); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/MixedViewProvider.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/MixedViewProvider.cs.meta deleted file mode 100644 index ff68aa5..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/MixedViewProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ef7ee3380d8e82c4f832f1e2535fe795 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/SimpleViewProvider.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/SimpleViewProvider.cs deleted file mode 100644 index a169970..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/SimpleViewProvider.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using SimpleObjectPool; - -namespace AlicizaX.UI.RecyclerView -{ - public sealed class SimpleViewProvider : ViewProvider - { - private readonly IObjectPool objectPool; - - public SimpleViewProvider(RecyclerView recyclerView, ViewHolder[] templates) : base(recyclerView, templates) - { - UnityComponentFactory factory = new(GetTemplate(), recyclerView.Content); - objectPool = new ObjectPool(factory, 100); - } - - public override ViewHolder GetTemplate(string viewName = "") - { - if (templates == null || templates.Length == 0) - { - throw new NullReferenceException("ViewProvider templates can not null or empty."); - } - return templates[0]; - } - - public override ViewHolder[] GetTemplates() - { - if (templates == null || templates.Length == 0) - { - throw new NullReferenceException("ViewProvider templates can not null or empty."); - } - return templates; - } - - public override ViewHolder Allocate(string viewName) - { - var viewHolder = objectPool.Allocate(); - viewHolder.gameObject.SetActive(true); - return viewHolder; - } - - public override void Free(string viewName, ViewHolder viewHolder) - { - objectPool.Free(viewHolder); - } - - public override void Reset() - { - Clear(); - objectPool.Dispose(); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/SimpleViewProvider.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/SimpleViewProvider.cs.meta deleted file mode 100644 index 0b5d8a4..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/SimpleViewProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f6100883160a6b841a1d7084de2dcd76 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/ViewProvider.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/ViewProvider.cs deleted file mode 100644 index 1fb5431..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/ViewProvider.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Collections.Generic; -using AlicizaX.UI.Runtime; -using UnityEngine; - -namespace AlicizaX.UI.RecyclerView -{ - /// - /// 提供和管理 ViewHolder - /// - public abstract class ViewProvider : IDisposable - { - private readonly List viewHolders = new(); - - public IAdapter Adapter { get; set; } - public LayoutManager LayoutManager { get; set; } - - public List ViewHolders => viewHolders; - - protected RecyclerView recyclerView; - protected ViewHolder[] templates; - - public ViewProvider(RecyclerView recyclerView, ViewHolder[] templates) - { - this.recyclerView = recyclerView; - this.templates = templates; - } - - public abstract ViewHolder GetTemplate(string viewName); - - public abstract ViewHolder[] GetTemplates(); - - public abstract ViewHolder Allocate(string viewName); - - public abstract void Free(string viewName, ViewHolder viewHolder); - - public abstract void Reset(); - - public void CreateViewHolder(int index) - { - for (int i = index; i < index + LayoutManager.Unit; i++) - { - if (i > Adapter.GetItemCount() - 1) break; - - string viewName = Adapter.GetViewName(i); - var viewHolder = Allocate(viewName); - viewHolder.OnStart(); - viewHolder.Name = viewName; - viewHolder.Index = i; - viewHolders.Add(viewHolder); - LayoutManager.Layout(viewHolder, i); - Adapter.OnBindViewHolder(viewHolder, i); - } - } - - public void RemoveViewHolder(int index) - { - for (int i = index; i < index + LayoutManager.Unit; i++) - { - if (i > Adapter.GetItemCount() - 1) break; - - int viewHolderIndex = GetViewHolderIndex(i); - - if (viewHolderIndex < 0 || viewHolderIndex >= viewHolders.Count) return; - - var viewHolder = viewHolders[viewHolderIndex]; - viewHolders.RemoveAt(viewHolderIndex); - viewHolder.OnRecycled(); - Free(viewHolder.Name, viewHolder); - } - } - - /// - /// 根据数据的下标获取对应的 ViewHolder - /// - /// 数据的下标 - /// - public ViewHolder GetViewHolder(int index) - { - foreach (var viewHolder in viewHolders) - { - if (viewHolder.Index == index) - { - return viewHolder; - } - } - - return null; - } - - /// - /// 根据数据的下标获取 ViewHolder 的下标 - /// - /// 数据的下标 - /// - public int GetViewHolderIndex(int index) - { - for (int i = 0; i < viewHolders.Count; i++) - { - if (viewHolders[i].Index == index) - { - return i; - } - } - - return -1; - } - - public void Clear() - { - foreach (var viewHolder in viewHolders) - { - Free(viewHolder.Name, viewHolder); - } - - viewHolders.Clear(); - } - - /// - /// 计算 ViewHolder 的尺寸 - /// - /// - /// - public Vector2 CalculateViewSize(int index) - { - Vector2 size = GetTemplate(Adapter.GetViewName(index)).SizeDelta; - return size; - } - - public int GetItemCount() - { - return Adapter == null ? 0 : Adapter.GetItemCount(); - } - - public void Dispose() - { - foreach (var viewHolder in viewHolders) - { - Free(viewHolder.Name, viewHolder); - } - - viewHolders.Clear(); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/ViewProvider.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/ViewProvider.cs.meta deleted file mode 100644 index 2def4f4..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/RecyclerView/ViewProvider/ViewProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b1c2cd7d2729fb4488ffd0e25e0fbf43 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension.meta deleted file mode 100644 index d42009b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: c1cc52c3a64c4e83b7663f7d98b524fa -timeCreated: 1738832143 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text.meta deleted file mode 100644 index a321f59..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7596661cc0d376d48948e0c163857788 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text/UXTextMeshPro.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text/UXTextMeshPro.cs deleted file mode 100644 index e1dbb9b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text/UXTextMeshPro.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using TMPro; - -namespace UnityEngine.UI -{ - public class UXTextMeshPro : TextMeshProUGUI - { - [SerializeField] private string m_localizationID = ""; - - protected override void Start() - { - base.Start(); - if (!Application.isPlaying) return; - ChangeLanguage(); - } - - protected void ChangeLanguage() - { - if (!string.IsNullOrEmpty(m_localizationID) && !"None".Equals(m_localizationID) && GameApp.Localization != null) - { - text = GameApp.Localization?.GetString(m_localizationID); - } - } - - /// - /// 重新动态设置多语言 - /// - /// - public void SetLocalization(string localizationID) - { - m_localizationID = localizationID; - ChangeLanguage(); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text/UXTextMeshPro.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text/UXTextMeshPro.cs.meta deleted file mode 100644 index 121427c..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/Text/UXTextMeshPro.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd17b8b605f2ba540bac156b5cf5ac77 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX.meta deleted file mode 100644 index e8bdfc6..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d002cbb3729643c7813fdfc55b8beb79 -timeCreated: 1744274178 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/IButton.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/IButton.cs deleted file mode 100644 index 1c5347b..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/IButton.cs +++ /dev/null @@ -1,9 +0,0 @@ -using UnityEngine.UI; - -namespace AlicizaX.UI.Extension -{ - public interface IButton - { - Button.ButtonClickedEvent onClick { get; set; } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/IButton.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/IButton.cs.meta deleted file mode 100644 index a541973..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/IButton.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 06a9d41d8ef2435395bf49fd7463aba6 -timeCreated: 1744867171 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXButton.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXButton.cs deleted file mode 100644 index 834d045..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXButton.cs +++ /dev/null @@ -1,336 +0,0 @@ -using System; -using System.Collections.Generic; -using AlicizaX; -using AlicizaX.UI.Extension; -using UnityEngine; -using UnityEngine.Events; -using UnityEngine.EventSystems; -using UnityEngine.Serialization; -using UnityEngine.UI; -using AudioType = AlicizaX.Audio.Runtime.AudioType; - -[Serializable] -public enum ButtonModeType -{ - Normal, - Toggle -} - -public enum ButtonSoundType -{ - Down, - Up, - Click, - Enter, - Exit -} - -[Serializable] -public class ButtonSoundCell -{ - public ButtonSoundType ButtonSoundType = ButtonSoundType.Click; - public string ButtonUISoundName = ""; -} - - -[System.Serializable] -public class TransitionData -{ - public Graphic targetGraphic; - public Selectable.Transition transition = Selectable.Transition.ColorTint; - public ColorBlock colors; - public SpriteState spriteState; -} - -[Serializable] -public struct ButtonSoundData -{ - public ButtonSoundType ButtonSoundType; - public string ButtonUISoundName; -} - - -internal enum SelectionState -{ - Normal, - - Highlighted, - - Pressed, - - Selected, - Disabled, -} - -[DisallowMultipleComponent] -public class UXButton : UIBehaviour, IButton, - IPointerDownHandler, - IPointerUpHandler, - IPointerEnterHandler, - IPointerExitHandler, - IPointerClickHandler -{ - [SerializeField] private bool m_Interactable = true; - - [SerializeField] private ButtonModeType m_Mode; - - [SerializeField] private Button.ButtonClickedEvent m_OnClick = new Button.ButtonClickedEvent(); - - [SerializeField] private TransitionData m_TransitionData = new TransitionData(); - - [SerializeField] private List m_ChildTransitions = new List(); - [SerializeField] private UXGroup m_UXGroup; - - [SerializeField] private List m_ButtonUISounds = new List(); - - private SelectionState m_SelectionState = SelectionState.Normal; - private bool m_DownAndExistUI; - private bool m_IsDown; - private bool m_IsTogSelected; - - - public bool IsSelected - { - get { return m_IsTogSelected; } - internal set - { - m_IsTogSelected = value; - onValueChanged?.Invoke(m_IsTogSelected); - m_SelectionState = m_IsTogSelected ? SelectionState.Selected : SelectionState.Normal; - UpdateVisualState(m_SelectionState, false); - } - } - - public Button.ButtonClickedEvent onClick - { - get { return m_OnClick; } - set { m_OnClick = value; } - } - - [SerializeField] private UnityEvent m_OnValueChanged = new UnityEvent(); - - public UnityEvent onValueChanged - { - get { return m_OnValueChanged; } - set { m_OnValueChanged = value; } - } - - protected override void Awake() - { - base.Awake(); - if (m_Mode == ButtonModeType.Toggle) - { - onValueChanged?.Invoke(IsSelected); - } - UpdateVisualState(m_SelectionState,true); - } - - - void IPointerDownHandler.OnPointerDown(PointerEventData eventData) - { - if (!m_Interactable) return; - if (eventData.button != PointerEventData.InputButton.Left) return; - m_IsDown = true; - m_SelectionState = SelectionState.Pressed; - UpdateVisualState(m_SelectionState, false); - PlayButtonSound(ButtonSoundType.Down); - } - - void IPointerUpHandler.OnPointerUp(PointerEventData eventData) - { - if (!m_Interactable) return; - - m_IsDown = false; - - if (!m_IsTogSelected) - { - m_SelectionState = m_DownAndExistUI ? SelectionState.Normal : SelectionState.Highlighted; - UpdateVisualState(m_SelectionState, false); - } - else - { - m_SelectionState = SelectionState.Selected; - UpdateVisualState(m_SelectionState, false); - } - - if (eventData.button != PointerEventData.InputButton.Left) - return; - - PlayButtonSound(ButtonSoundType.Up); - } - - void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData) - { - if (!m_Interactable || CantTouch()) return; - - m_SelectionState = SelectionState.Highlighted; - m_DownAndExistUI = false; - if (m_IsDown) return; - UpdateVisualState(m_SelectionState, false); - PlayButtonSound(ButtonSoundType.Enter); - } - - void IPointerExitHandler.OnPointerExit(PointerEventData eventData) - { - if (!m_Interactable) return; - if (m_IsDown) - { - m_DownAndExistUI = true; - return; - } - - if (CantTouch()) - { - return; - } - - m_SelectionState = SelectionState.Normal; - - UpdateVisualState(m_SelectionState, false); - PlayButtonSound(ButtonSoundType.Exit); - } - - private bool CantTouch() - { - return m_Mode == ButtonModeType.Toggle && m_IsTogSelected; - } - - public void SetSelect(bool state, bool boardEvent = false) - { - if (m_Mode != ButtonModeType.Toggle) return; - m_IsTogSelected = state; - if (boardEvent) onValueChanged?.Invoke(m_IsTogSelected); - m_SelectionState = m_IsTogSelected ? SelectionState.Selected : SelectionState.Normal; - UpdateVisualState(m_SelectionState, false); - } - - private void ProcessClick() - { - if (m_Mode == ButtonModeType.Normal) - { - UISystemProfilerApi.AddMarker("Button.onClick", this); - onClick?.Invoke(); - } - else - { - if (m_UXGroup) - { - m_UXGroup.NotifyButtonClicked(this); - return; - } - - IsSelected = !IsSelected; - } - } - - private void UpdateVisualState(SelectionState state, bool instant) - { - ProcessTransitionData(m_TransitionData, state, instant); - foreach (var transition in m_ChildTransitions) - { - ProcessTransitionData(transition, state, instant); - } - } - - - private void ProcessTransitionData(TransitionData transition, SelectionState state, bool instant) - { - if (transition.targetGraphic == null) return; - - Color tintColor; - Sprite transitionSprite; - switch (state) - { - case SelectionState.Normal: - tintColor = transition.colors.normalColor; - transitionSprite = null; - break; - case SelectionState.Highlighted: - tintColor = transition.colors.highlightedColor; - transitionSprite = transition.spriteState.highlightedSprite; - break; - case SelectionState.Pressed: - tintColor = transition.colors.pressedColor; - transitionSprite = transition.spriteState.pressedSprite; - break; - case SelectionState.Selected: - tintColor = transition.colors.selectedColor; - transitionSprite = transition.spriteState.selectedSprite; - break; - case SelectionState.Disabled: - tintColor = transition.colors.disabledColor; - transitionSprite = transition.spriteState.disabledSprite; - break; - default: - tintColor = Color.black; - transitionSprite = null; - break; - } - - switch (transition.transition) - { - case Selectable.Transition.ColorTint: - StartColorTween(transition, tintColor * transition.colors.colorMultiplier, instant); - break; - case Selectable.Transition.SpriteSwap: - DoSpriteSwap(transition, transitionSprite); - break; - } - } - - protected void StartColorTween(TransitionData transitionData, Color targetColor, bool instant) - { - if (Application.isPlaying) - { - transitionData.targetGraphic.CrossFadeColor(targetColor, instant ? 0f : transitionData.colors.fadeDuration, true, true); - } - else - { - transitionData.targetGraphic.canvasRenderer.SetColor(targetColor); - } - } - - protected void DoSpriteSwap(TransitionData transitionData, Sprite newSprite) - { - if (transitionData.targetGraphic is Image image) - { - image.overrideSprite = newSprite; - } - else if (transitionData.targetGraphic != null) - { - Log.Error($"Target Graphic must be Image for SpriteSwap. Object: {transitionData.targetGraphic.name}"); - } - } - - protected void PlayButtonSound(ButtonSoundType buttonSoundType) - { - ButtonSoundCell buttonSound = GetButtonSound(buttonSoundType); - if (buttonSound == null || string.IsNullOrEmpty(buttonSound.ButtonUISoundName)) - { - return; - } - - GameApp.Audio.Play(AudioType.UISound, buttonSound.ButtonUISoundName, false, GameApp.Audio.UISoundVolume, true); - } - - protected ButtonSoundCell GetButtonSound(ButtonSoundType buttonSoundType) - { - foreach (var buttonSound in m_ButtonUISounds) - { - if (buttonSound.ButtonSoundType == buttonSoundType) - { - return buttonSound; - } - } - - return null; - } - - public void OnPointerClick(PointerEventData eventData) - { - if (eventData.button != PointerEventData.InputButton.Left) - return; - PlayButtonSound(ButtonSoundType.Click); - ProcessClick(); - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXButton.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXButton.cs.meta deleted file mode 100644 index c29d0d4..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXButton.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d7e92b092d584bb39e5239463f064cbe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 337b039db051cab44819dc51e6af1f43, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXDraggable.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXDraggable.cs deleted file mode 100644 index 31ca356..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXDraggable.cs +++ /dev/null @@ -1,28 +0,0 @@ -using UnityEngine; -using UnityEngine.Events; -using UnityEngine.EventSystems; - -namespace AlicizaX.UI.Extension -{ - public class UXDraggable:MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler - { - public UnityEvent onDrag; - public UnityEvent onBeginDrag; - public UnityEvent onEndDrag; - - void IDragHandler.OnDrag(PointerEventData eventData) - { - onDrag?.Invoke(eventData); - } - - void IBeginDragHandler.OnBeginDrag(PointerEventData eventData) - { - onBeginDrag?.Invoke(eventData); - } - - void IEndDragHandler.OnEndDrag(PointerEventData eventData) - { - onEndDrag?.Invoke(eventData); - } - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXDraggable.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXDraggable.cs.meta deleted file mode 100644 index b51f193..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXDraggable.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 8eb653b5933b44098348ec58002ebe9b -timeCreated: 1744720259 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXGroup.cs b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXGroup.cs deleted file mode 100644 index 286cdbb..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXGroup.cs +++ /dev/null @@ -1,124 +0,0 @@ -// UXGroup.cs - -using UnityEngine; -using UnityEngine.Events; -using System.Collections.Generic; -using Sirenix.OdinInspector; -using UnityEngine.EventSystems; - -[DisallowMultipleComponent] -public class UXGroup : UIBehaviour -{ - [SerializeField] private bool m_AllowSwitchOff; - [ReadOnly] [SerializeField] private List m_Buttons = new List(); - - private UXButton currentUXButton = null; - - public UnityEvent onSelectedChanged = new UnityEvent(); - - public bool allowSwitchOff - { - get => m_AllowSwitchOff; - set - { - m_AllowSwitchOff = value; - ValidateGroupState(); - } - } - - protected override void OnDestroy() - { - base.OnDestroy(); - m_Buttons.Clear(); - currentUXButton = null; - } - - - protected override void Awake() - { - base.Awake(); - ValidateGroupState(); - } - - public void RegisterButton(UXButton button) - { - if (!m_Buttons.Contains(button)) - { - m_Buttons.Add(button); - if (button.IsSelected) - { - if (currentUXButton != null && currentUXButton != button) - { - currentUXButton.IsSelected = false; - } - currentUXButton = button; - } - ValidateGroupState(); - } - } - - public void UnregisterButton(UXButton button) - { - if (m_Buttons.Contains(button)) - { - m_Buttons.Remove(button); - button.IsSelected = false; - } - } - - internal void NotifyButtonClicked(UXButton clickedButton) - { - if (!clickedButton.IsSelected) - { - SetSelectedButton(clickedButton); - } - else - { - if (m_AllowSwitchOff) - SetSelectedButton(null); - else if (currentUXButton != clickedButton) - clickedButton.IsSelected = true; - } - } - - private void SetSelectedButton(UXButton targetButton) - { - UXButton previousSelected = currentUXButton; - currentUXButton = null; // 防止递归 - - foreach (var button in m_Buttons) - { - bool shouldSelect = (button == targetButton); - if (button.IsSelected != shouldSelect) - { - button.IsSelected = shouldSelect; - } - if (shouldSelect) currentUXButton = button; - } - - if (previousSelected != currentUXButton) - { - onSelectedChanged.Invoke(currentUXButton); - } - } - - private void ValidateGroupState() - { - bool anySelected = m_Buttons.Exists(b => b.IsSelected); - if (!anySelected && m_Buttons.Count > 0 && !m_AllowSwitchOff) - { - SetSelectedButton(m_Buttons[0]); - } - } - - public bool AnyOtherSelected(UXButton exclusion) - { - foreach (var button in m_Buttons) - { - if (button != exclusion && button.IsSelected) - return true; - } - - return false; - } -} diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXGroup.cs.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXGroup.cs.meta deleted file mode 100644 index fb0d956..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/UGUIExtension/UX/UXGroup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7f0492ee9ffe496c9f028b5f28a10308 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 42b2d97a2cb439b4395c6dca63357d89, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/link.xml b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/link.xml deleted file mode 100644 index 4b6aaeb..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/link.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/link.xml.meta b/Client/Packages/com.alicizax.unity.ui.extension/Runtime/link.xml.meta deleted file mode 100644 index 58ec092..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/Runtime/link.xml.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a60c8f27b8f25724085fb5a768d8d536 -timeCreated: 1737098208 \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/package.json b/Client/Packages/com.alicizax.unity.ui.extension/package.json deleted file mode 100644 index 5218966..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "com.alicizax.unity.ui.extension", - "displayName": "Aliciza X UI Extension", - "category": "Aliciza X", - "description": "Aliciza X UI Extension", - "version": "1.0.1", - "unity": "2025.1", - "keywords": [ - "Aliciza X" - ], - "repository": { - "name": "com.alicizax.unity", - "url": "http://101.34.252.46:3000/AlicizaX/", - "type": "git" - }, - "author": { - "name": "Yuliuren", - "email": "yuliuren00@gmail.com" - } -} \ No newline at end of file diff --git a/Client/Packages/com.alicizax.unity.ui.extension/package.json.meta b/Client/Packages/com.alicizax.unity.ui.extension/package.json.meta deleted file mode 100644 index c563c1d..0000000 --- a/Client/Packages/com.alicizax.unity.ui.extension/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2c9e3513dd282f84fb0e5eecff03b0c0 -PackageManifestImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Client/Packages/com.alicizax.unity.ui/Editor/GenerateTool/UISettingEditorWindow.cs b/Client/Packages/com.alicizax.unity.ui/Editor/GenerateTool/UISettingEditorWindow.cs index 46cc4e4..dff45a5 100644 --- a/Client/Packages/com.alicizax.unity.ui/Editor/GenerateTool/UISettingEditorWindow.cs +++ b/Client/Packages/com.alicizax.unity.ui/Editor/GenerateTool/UISettingEditorWindow.cs @@ -4,6 +4,7 @@ using Sirenix.OdinInspector; using Sirenix.OdinInspector.Editor; using UnityEditor; using UnityEngine; +using UnityEngine.Windows; namespace AlicizaX.UI.Editor { @@ -59,6 +60,24 @@ namespace AlicizaX.UI.Editor UIElementRegexConfigs = JsonConvert.DeserializeObject>(text); } + [TabGroup("UI元素映射")] + [Sirenix.OdinInspector.Button("导出")] + private void ExportConfig() + { + var json = JsonConvert.SerializeObject(UIElementRegexConfigs); + System.IO.File.WriteAllText("Assets/uielementconfig.txt", json); + AssetDatabase.Refresh(); + Debug.Log("Export UIElements Finished"); + } + + [TabGroup("UI元素映射")] + [Sirenix.OdinInspector.Button("导入")] + private void ImportConfig(TextAsset text) + { + UIElementRegexConfigs = JsonConvert.DeserializeObject>(text.text); + Debug.Log("Import UIElements Finished"); + } + protected override void OnDisable() { diff --git a/Client/Packages/com.alicizax.unity.ui/Editor/Res/default.txt b/Client/Packages/com.alicizax.unity.ui/Editor/Res/default.txt index 8b98db5..d09f275 100644 --- a/Client/Packages/com.alicizax.unity.ui/Editor/Res/default.txt +++ b/Client/Packages/com.alicizax.unity.ui/Editor/Res/default.txt @@ -1,70 +1 @@ -[ - { - "uiElementRegex":"Rect", - "componentType":"RectTransform" - }, - { - "uiElementRegex":"Obj", - "componentType":"GameObject" - }, - { - "uiElementRegex":"Tf", - "componentType":"Transform" - }, - { - "uiElementRegex":"Btn", - "componentType":"UIButtonSuper" - }, - { - "uiElementRegex":"Slider", - "componentType":"Slider" - }, - { - "uiElementRegex":"Img", - "componentType":"Image" - }, - { - "uiElementRegex":"RImg", - "componentType":"RawImage" - }, - { - "uiElementRegex":"Scrollbar", - "componentType":"Scrollbar" - }, - { - "uiElementRegex":"ScrollRect", - "componentType":"ScrollRect" - }, - { - "uiElementRegex":"GLayout", - "componentType":"GridLayoutGroup" - }, - { - "uiElementRegex":"HLayout", - "componentType":"HorizontalLayoutGroup" - }, - { - "uiElementRegex":"VLayout", - "componentType":"VerticalLayoutGroup" - }, - { - "uiElementRegex":"Text", - "componentType":"TMPro.TextMeshProUGUI" - }, - { - "uiElementRegex":"TogGroup", - "componentType":"ToggleGroup" - }, - { - "uiElementRegex":"Mask2D", - "componentType":"RectMask2D" - }, - { - "uiElementRegex":"Video", - "componentType":"VideoPlayer" - }, - { - "uiElementRegex":"Input", - "componentType":"TMPro.TMP_InputField" - } -] +[{"uiElementRegex":"Rect","componentType":"RectTransform"},{"uiElementRegex":"Obj","componentType":"GameObject"},{"uiElementRegex":"Tf","componentType":"Transform"},{"uiElementRegex":"Btn","componentType":"UXButton"},{"uiElementRegex":"Slider","componentType":"Slider"},{"uiElementRegex":"Img","componentType":"UXImage"},{"uiElementRegex":"RImg","componentType":"RawImage"},{"uiElementRegex":"Scrollbar","componentType":"Scrollbar"},{"uiElementRegex":"ScrollRect","componentType":"ScrollRect"},{"uiElementRegex":"GLayout","componentType":"GridLayoutGroup"},{"uiElementRegex":"HLayout","componentType":"HorizontalLayoutGroup"},{"uiElementRegex":"VLayout","componentType":"VerticalLayoutGroup"},{"uiElementRegex":"Text","componentType":"TMPro.TextMeshProUGUI"},{"uiElementRegex":"TogGroup","componentType":"UXGroup"},{"uiElementRegex":"Mask2D","componentType":"RectMask2D"},{"uiElementRegex":"Video","componentType":"Video.VideoPlayer"},{"uiElementRegex":"Input","componentType":"TMPro.TMP_InputField"},{"uiElementRegex":"CanvasGroup","componentType":"CanvasGroup"},{"uiElementRegex":"ScrollView","componentType":"RecyclerView"},{"uiElementRegex":"Drag","componentType":"UXDraggable"}] \ No newline at end of file diff --git a/Client/ProjectSettings/AtlasConfiguration.asset b/Client/ProjectSettings/AtlasConfiguration.asset index 1b3b0c4..1499e9d 100644 --- a/Client/ProjectSettings/AtlasConfiguration.asset +++ b/Client/ProjectSettings/AtlasConfiguration.asset @@ -18,7 +18,7 @@ MonoBehaviour: iosFormat: 49 webglFormat: 50 padding: 4 - enableRotation: 1 + enableRotation: 0 blockOffset: 1 tightPacking: 1 compressionQuality: 50 @@ -28,4 +28,5 @@ MonoBehaviour: excludeKeywords: - UIRaw_Delete - _Raw - excludeFolder: [] + excludeFolders: + - Assets/Bundles/UIRaw/Raw diff --git a/Client/ProjectSettings/UIGenerateConfiguration.asset b/Client/ProjectSettings/UIGenerateConfiguration.asset index 4dfcaaf..bcd4c0d 100644 --- a/Client/ProjectSettings/UIGenerateConfiguration.asset +++ b/Client/ProjectSettings/UIGenerateConfiguration.asset @@ -38,11 +38,11 @@ MonoBehaviour: - uiElementRegex: Tf componentType: Transform - uiElementRegex: Btn - componentType: Button + componentType: UXButton - uiElementRegex: Slider componentType: Slider - uiElementRegex: Img - componentType: Image + componentType: UXImage - uiElementRegex: RImg componentType: RawImage - uiElementRegex: Scrollbar @@ -58,7 +58,7 @@ MonoBehaviour: - uiElementRegex: Text componentType: TMPro.TextMeshProUGUI - uiElementRegex: TogGroup - componentType: ToggleGroup + componentType: UXGroup - uiElementRegex: Mask2D componentType: RectMask2D - uiElementRegex: Video @@ -69,3 +69,5 @@ MonoBehaviour: componentType: CanvasGroup - uiElementRegex: ScrollView componentType: RecyclerView + - uiElementRegex: Drag + componentType: UXDraggable diff --git a/Client/UserSettings/EditorUserSettings.asset b/Client/UserSettings/EditorUserSettings.asset index f575daf..7d36584 100644 --- a/Client/UserSettings/EditorUserSettings.asset +++ b/Client/UserSettings/EditorUserSettings.asset @@ -12,31 +12,31 @@ EditorUserSettings: value: 0100005650505e0358570d2749770b444f4e4a7a7b2c73647f794537b0b76469 flags: 0 RecentlyUsedSceneGuid-1: - value: 5001560504060c590f5b0f7245725a44404f1d7c297e2233787e4a36b5e4666b - flags: 0 - RecentlyUsedSceneGuid-2: value: 5753515207050c035d5c5f7447720b44104e4b292a7a746875784d62e4e26d68 flags: 0 - RecentlyUsedSceneGuid-3: + RecentlyUsedSceneGuid-2: value: 0154555f01030b02095c5f7746760d44434f407f2d7f76317d784d61b1e6313c flags: 0 - RecentlyUsedSceneGuid-4: + RecentlyUsedSceneGuid-3: value: 0004045001000a0b0e0f5f7449775d1146154f29787825652e784563e6b53669 flags: 0 - RecentlyUsedSceneGuid-5: + RecentlyUsedSceneGuid-4: value: 5a52050453545b59545f082143770d464e4f497c7c2e27672e2d1b35b2e4606c flags: 0 - RecentlyUsedSceneGuid-6: + RecentlyUsedSceneGuid-5: value: 5202055155065d0c0f0d597246770f45104f402e7f297e672f2d4d6abab2366b flags: 0 - RecentlyUsedSceneGuid-7: + RecentlyUsedSceneGuid-6: value: 5204045351045a025b5b542345770b45404f41787e7c25677c2f4563b7e26568 flags: 0 + RecentlyUsedSceneGuid-7: + value: 5001560504060c590f5b0f7245725a44404f1d7c297e2233787e4a36b5e4666b + flags: 0 RecentlyUsedSceneGuid-8: - value: 5a07065703500c59585e0e7748770d44444f4a737d2d7f35787d4f63e0b26668 + value: 50500404540c580d0f0b5e7543725b44424f4c7a7b7c7734747e4f36e4b1676d flags: 0 RecentlyUsedSceneGuid-9: - value: 50500404540c580d0f0b5e7543725b44424f4c7a7b7c7734747e4f36e4b1676d + value: 5a07065703500c59585e0e7748770d44444f4a737d2d7f35787d4f63e0b26668 flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/Client/UserSettings/Layouts/default-6000.dwlt b/Client/UserSettings/Layouts/default-6000.dwlt index 9677799..ad03c14 100644 --- a/Client/UserSettings/Layouts/default-6000.dwlt +++ b/Client/UserSettings/Layouts/default-6000.dwlt @@ -14,17 +14,43 @@ MonoBehaviour: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 1920 - y: 48 + x: 0 + y: 43 width: 1920 height: 997 m_ShowMode: 4 - m_Title: Project - m_RootView: {fileID: 4} + m_Title: Scene + m_RootView: {fileID: 5} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_Maximized: 1 --- !u!114 &2 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: ProjectBrowser + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 723 + y: 0 + width: 492 + height: 941 + m_MinSize: {x: 232, y: 276} + m_MaxSize: {x: 10002, y: 10026} + m_ActualView: {fileID: 20} + m_Panes: + - {fileID: 20} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -40,17 +66,17 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 185 - width: 625 - height: 756 + y: 471 + width: 477 + height: 470 m_MinSize: {x: 51, y: 76} m_MaxSize: {x: 4001, y: 4026} - m_ActualView: {fileID: 14} + m_ActualView: {fileID: 15} m_Panes: - - {fileID: 14} + - {fileID: 15} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &3 +--- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -63,20 +89,20 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 8} - - {fileID: 2} + - {fileID: 9} + - {fileID: 3} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 625 + width: 477 height: 941 m_MinSize: {x: 100, y: 100} m_MaxSize: {x: 8096, y: 16192} vertical: 1 - controlID: 26 + controlID: 17 draggingID: 0 ---- !u!114 &4 +--- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -89,9 +115,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 5} - - {fileID: 7} - {fileID: 6} + - {fileID: 8} + - {fileID: 7} m_Position: serializedVersion: 2 x: 0 @@ -104,7 +130,7 @@ MonoBehaviour: m_TopViewHeight: 36 m_UseBottomView: 1 m_BottomViewHeight: 20 ---- !u!114 &5 +--- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -126,7 +152,7 @@ MonoBehaviour: m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} m_LastLoadedLayoutName: ---- !u!114 &6 +--- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -147,7 +173,7 @@ MonoBehaviour: height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} ---- !u!114 &7 +--- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -160,9 +186,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 3} - - {fileID: 9} - - {fileID: 12} + - {fileID: 4} + - {fileID: 10} + - {fileID: 2} - {fileID: 13} m_Position: serializedVersion: 2 @@ -175,7 +201,7 @@ MonoBehaviour: vertical: 0 controlID: 102 draggingID: 0 ---- !u!114 &8 +--- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -192,17 +218,17 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 625 - height: 185 + width: 477 + height: 471 m_MinSize: {x: 201, y: 226} m_MaxSize: {x: 4001, y: 4026} - m_ActualView: {fileID: 16} + m_ActualView: {fileID: 17} m_Panes: - - {fileID: 15} - {fileID: 16} + - {fileID: 17} m_Selected: 1 m_LastSelected: 1 ---- !u!114 &9 +--- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -215,20 +241,20 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 10} - {fileID: 11} + - {fileID: 12} m_Position: serializedVersion: 2 - x: 625 + x: 477 y: 0 - width: 278 + width: 246 height: 941 m_MinSize: {x: 100, y: 100} m_MaxSize: {x: 8096, y: 16192} vertical: 1 controlID: 71 draggingID: 0 ---- !u!114 &10 +--- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -245,16 +271,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 278 + width: 246 height: 440 m_MinSize: {x: 202, y: 226} m_MaxSize: {x: 4002, y: 4026} - m_ActualView: {fileID: 17} + m_ActualView: {fileID: 18} m_Panes: - - {fileID: 17} + - {fileID: 18} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &11 +--- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -271,36 +297,10 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 440 - width: 278 + width: 246 height: 501 m_MinSize: {x: 102, y: 126} m_MaxSize: {x: 4002, y: 4026} - m_ActualView: {fileID: 18} - m_Panes: - - {fileID: 18} - m_Selected: 0 - m_LastSelected: 0 ---- !u!114 &12 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 903 - y: 0 - width: 588 - height: 941 - m_MinSize: {x: 232, y: 276} - m_MaxSize: {x: 10002, y: 10026} m_ActualView: {fileID: 19} m_Panes: - {fileID: 19} @@ -321,18 +321,67 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1491 + x: 1215 y: 0 - width: 429 + width: 705 height: 941 m_MinSize: {x: 276, y: 76} m_MaxSize: {x: 4001, y: 4026} - m_ActualView: {fileID: 20} + m_ActualView: {fileID: 14} m_Panes: - - {fileID: 20} + - {fileID: 14} m_Selected: 0 m_LastSelected: 0 --- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Inspector + m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_TextWithWhitespace: "Inspector\u200B" + m_Pos: + serializedVersion: 2 + x: 1216 + y: 24 + width: 704 + height: 915 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 + m_ObjectsLockedBeforeSerialization: [] + m_InstanceIDsLockedBeforeSerialization: + m_PreviewResizer: + m_CachedPref: 151 + m_ControlHash: 1412526313 + m_PrefName: Preview_InspectorPreview + m_LastInspectedObjectInstanceID: -1 + m_LastVerticalScrollValue: 0 + m_GlobalObjectId: + m_InspectorMode: 0 + m_LockTracker: + m_IsLocked: 0 + m_PreviewWindow: {fileID: 0} +--- !u!114 &15 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -354,9 +403,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 209 - width: 624 - height: 730 + y: 495 + width: 476 + height: 444 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -374,7 +423,7 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 624, y: 351} + m_TargetSize: {x: 476, y: 268} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -389,10 +438,10 @@ MonoBehaviour: m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -312 - m_HBaseRangeMax: 312 - m_VBaseRangeMin: -175.5 - m_VBaseRangeMax: 175.5 + m_HBaseRangeMin: -238 + m_HBaseRangeMax: 238 + m_VBaseRangeMin: -134 + m_VBaseRangeMax: 134 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -410,29 +459,29 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 624 - height: 709 + width: 476 + height: 423 m_Scale: {x: 1, y: 1} - m_Translation: {x: 312, y: 354.5} + m_Translation: {x: 238, y: 211.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -312 - y: -354.5 - width: 624 - height: 709 + x: -238 + y: -211.5 + width: 476 + height: 423 m_MinimalGUI: 1 m_defaultScale: 1 - m_LastWindowPixelSize: {x: 624, y: 730} + m_LastWindowPixelSize: {x: 476, y: 444} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 m_XRRenderMode: 0 m_RenderTexture: {fileID: 0} ---- !u!114 &15 +--- !u!114 &16 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -504,7 +553,7 @@ MonoBehaviour: m_CurrentEditor: 1 m_LayerEditor: m_SelectedLayerIndex: 0 ---- !u!114 &16 +--- !u!114 &17 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -527,8 +576,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 24 - width: 624 - height: 159 + width: 476 + height: 445 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -599,11 +648,11 @@ MonoBehaviour: displayed: 1 id: unity-transform-toolbar index: 0 - contents: '{"m_Layout":2,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-258.9990234375,"y":-238.0},"m_SnapOffsetDelta":{"x":0.0,"y":79.0},"m_FloatingSnapCorner":3,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + contents: '{"m_Layout":2,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-258.9990234375,"y":-238.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":3,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' floating: 0 collapsed: 0 snapOffset: {x: -258.99902, y: -238} - snapOffsetDelta: {x: 0, y: 79} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 3 layout: 2 size: {x: 0, y: 0} @@ -851,12 +900,12 @@ MonoBehaviour: displayed: 1 id: AINavigationOverlay index: 7 - contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-216.0,"y":-200.0},"m_SnapOffsetDelta":{"x":0.0,"y":41.0},"m_FloatingSnapCorner":3,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":21.0,"y":-54.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":2,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' floating: 0 collapsed: 0 - snapOffset: {x: -216, y: -200} - snapOffsetDelta: {x: 0, y: 41} - snapCorner: 3 + snapOffset: {x: 21, y: -54} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 2 layout: 4 size: {x: 0, y: 0} sizeOverridden: 0 @@ -1097,9 +1146,9 @@ MonoBehaviour: m_AudioPlay: 0 m_DebugDrawModesUseInteractiveLightBakingData: 0 m_Position: - m_Target: {x: 999.45483, y: 998.5656, z: 72.80655} + m_Target: {x: 999.8521, y: 1000.1492, z: 596.13214} speed: 2 - m_Value: {x: 999.45483, y: 998.5656, z: 72.80655} + m_Value: {x: 999.8521, y: 1000.1492, z: 596.13214} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -1149,9 +1198,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 1.720241 + m_Target: 2.6442597 speed: 2 - m_Value: 1.720241 + m_Value: 2.6442597 m_Ortho: m_Target: 1 speed: 2 @@ -1172,7 +1221,7 @@ MonoBehaviour: m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} m_LastSceneViewOrtho: 0 m_Viewpoint: - m_SceneView: {fileID: 16} + m_SceneView: {fileID: 17} m_CameraOverscanSettings: m_Opacity: 50 m_Scale: 1 @@ -1182,7 +1231,7 @@ MonoBehaviour: m_LastLockedObject: {fileID: 0} m_LastDebugDrawMode: 35 m_ViewIsLockedToObject: 0 ---- !u!114 &17 +--- !u!114 &18 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1205,7 +1254,7 @@ MonoBehaviour: serializedVersion: 2 x: 1 y: 24 - width: 276 + width: 244 height: 414 m_SerializedDataModeController: m_DataMode: 0 @@ -1223,7 +1272,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: f8faffff + m_ExpandedIDs: 449bfcffa630ffffae30ffffb030ffff9a31ffffb432ffffbc32ffffbe32ffffac33ffff5c34ffff4a35ffffc24cffffca4cffffcc4cffff604dffff624effffeefafffff6fafffff8faffff7ec100009ad2000058d30000eed30000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1240,7 +1289,7 @@ MonoBehaviour: m_OriginalEventType: 11 m_IsRenamingFilename: 0 m_TrimLeadingAndTrailingWhitespace: 0 - m_ClientGUIView: {fileID: 10} + m_ClientGUIView: {fileID: 12} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -1248,7 +1297,7 @@ MonoBehaviour: m_IsLocked: 0 m_CurrentSortingName: TransformSorting m_WindowGUID: 85728a346145f5041b41bc3ce2f945c6 ---- !u!114 &18 +--- !u!114 &19 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1271,7 +1320,7 @@ MonoBehaviour: serializedVersion: 2 x: 1 y: 464 - width: 276 + width: 244 height: 475 m_SerializedDataModeController: m_DataMode: 0 @@ -1284,7 +1333,7 @@ MonoBehaviour: m_SaveData: [] m_ContainerData: [] m_OverlaysVisible: 1 ---- !u!114 &19 +--- !u!114 &20 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1305,9 +1354,9 @@ MonoBehaviour: m_TextWithWhitespace: "Project\u200B" m_Pos: serializedVersion: 2 - x: 904 + x: 724 y: 24 - width: 586 + width: 490 height: 915 m_SerializedDataModeController: m_DataMode: 0 @@ -1331,7 +1380,7 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 0 m_Folders: - - Packages/com.alicizax.unity.editor.extension + - Packages/com.alicizax.unity.ui.extension/Editor/Icons m_Globs: [] m_ProductIds: m_AnyWithAssetOrigin: 0 @@ -1349,7 +1398,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: e48c0000 m_LastClickedID: 36068 - m_ExpandedIDs: 0000000044c2000046c2000048c200004ac200004cc200004ec2000050c2000052c2000054c2000056c2000058c200005ac200005cc200005ec2000060c2000062c2000064c2000066c2000068c200006ac200006cc200006ec2000070c2000072c2000074c2000076c2000078c200007ac200007cc200007ec2000080c2000082c2000084c2000086c2000088c200008ac200008cc200008ec2000090c2000092c2000094c2000096c2000098c200009ac200009cc200009ec20000a0c20000a2c20000a4c20000a6c20000a8c20000aac20000acc20000aec20000b0c20000b2c20000b4c20000b6c20000b8c20000bac20000bcc20000bec20000c0c20000c2c20000c4c20000c6c20000c8c20000cac20000ccc20000cec20000d0c20000d2c20000d4c20000d6c20000d8c20000dac20000dcc20000dec20000e0c20000e2c20000e4c20000e6c20000e8c20000eac20000ecc20000eec20000f0c20000f2c20000f4c20000f6c20000f8c20000fac20000fcc20000fec2000000c3000002c3000004c3000006c3000008c300000ac300000cc300000ec30000 + m_ExpandedIDs: 0000000016c2000018c200001ac200001cc200001ec2000020c2000022c2000024c2000026c2000028c200002ac200002cc200002ec2000030c2000032c2000034c2000036c2000038c200003ac200003cc200003ec2000040c2000042c2000044c2000046c2000048c200004ac200004cc200004ec2000050c2000052c2000054c2000056c2000058c200005ac200005cc200005ec2000060c2000062c2000064c2000066c2000068c200006ac200006cc200006ec2000070c2000072c2000074c2000076c2000078c200007ac200007cc200007ec2000080c2000082c2000084c2000086c2000088c200008ac200008cc200008ec2000090c2000092c2000094c2000096c2000098c200009ac200009cc200009ec20000a0c20000a2c20000a4c20000a6c20000a8c20000aac20000acc20000aec20000b0c20000b2c20000b4c20000b6c20000b8c20000bac20000bcc20000bec20000c0c20000c2c20000c4c20000c6c20000c8c20000cac20000ccc20000cec20000d0c20000d2c20000d4c20000d6c20000d8c20000dac20000dcc20000dec20000e0c20000e2c20000e4c20000e6c20000e8c20000eac20000ecc20000eec20000f0c20000f2c20000f4c20000f6c20000f8c20000fac20000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1375,10 +1424,10 @@ MonoBehaviour: m_Icon: {fileID: 0} m_ResourceFile: m_AssetTreeState: - scrollPos: {x: 0, y: 0} + scrollPos: {x: 0, y: 2511} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 0000000044c2000046c2000048c200004ac200004cc200004ec2000050c2000052c2000054c2000056c2000058c200005ac200005cc200005ec2000060c2000062c2000064c2000066c2000068c200006ac200006cc200006ec2000070c2000072c2000074c2000076c2000078c200007ac200007cc200007ec2000080c2000082c2000084c2000086c2000088c200008ac200008cc200008ec2000090c2000092c2000094c2000096c2000098c200009ac200009cc200009ec20000a0c20000a2c20000a4c20000a6c20000a8c20000aac20000acc20000aec20000b0c20000b2c20000b4c20000b6c20000b8c20000bac20000bcc20000bec20000c0c20000c2c20000c4c20000c6c20000c8c20000cac20000ccc20000cec20000d0c20000d2c20000d4c20000d6c20000d8c20000dac20000dcc20000dec20000e0c20000e2c20000e4c20000e6c20000e8c20000eac20000ecc20000eec20000f0c20000f2c20000f4c20000f6c20000f8c20000fac20000fcc20000fec2000000c3000002c3000004c3000006c3000008c300000ac300000cc300000ec30000 + m_ExpandedIDs: 0000000016c2000018c200001ac200001cc200001ec2000020c2000022c2000024c2000026c2000028c200002ac200002cc200002ec2000030c2000032c2000034c2000036c2000038c200003ac200003cc200003ec2000040c2000042c2000044c2000046c2000048c200004ac200004cc200004ec2000050c2000052c2000054c2000056c2000058c200005ac200005cc200005ec2000060c2000062c2000064c2000066c2000068c200006ac200006cc200006ec2000070c2000072c2000074c2000076c2000078c200007ac200007cc200007ec2000080c2000082c2000084c2000086c2000088c200008ac200008cc200008ec2000090c2000092c2000094c2000096c2000098c200009ac200009cc200009ec20000a0c20000a2c20000a4c20000a6c20000a8c20000aac20000acc20000aec20000b0c20000b2c20000b4c20000b6c20000b8c20000bac20000bcc20000bec20000c0c20000c2c20000c4c20000c6c20000c8c20000cac20000ccc20000cec20000d0c20000d2c20000d4c20000d6c20000d8c20000dac20000dcc20000dec20000e0c20000e2c20000e4c20000e6c20000e8c20000eac20000ecc20000eec20000f0c20000f2c20000f4c20000f6c20000f8c20000fac20000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1395,7 +1444,7 @@ MonoBehaviour: m_OriginalEventType: 11 m_IsRenamingFilename: 1 m_TrimLeadingAndTrailingWhitespace: 0 - m_ClientGUIView: {fileID: 12} + m_ClientGUIView: {fileID: 2} m_SearchString: m_CreateAssetUtility: m_EndAction: {fileID: 0} @@ -1424,7 +1473,7 @@ MonoBehaviour: m_OriginalEventType: 11 m_IsRenamingFilename: 1 m_TrimLeadingAndTrailingWhitespace: 0 - m_ClientGUIView: {fileID: 12} + m_ClientGUIView: {fileID: 13} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -1436,52 +1485,3 @@ MonoBehaviour: m_GridSize: 96 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 115 ---- !u!114 &20 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Inspector - m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: - m_TextWithWhitespace: "Inspector\u200B" - m_Pos: - serializedVersion: 2 - x: 1492 - y: 24 - width: 428 - height: 915 - m_SerializedDataModeController: - m_DataMode: 0 - m_PreferredDataMode: 0 - m_SupportedDataModes: - isAutomatic: 1 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_ContainerData: [] - m_OverlaysVisible: 1 - m_ObjectsLockedBeforeSerialization: [] - m_InstanceIDsLockedBeforeSerialization: - m_PreviewResizer: - m_CachedPref: -151 - m_ControlHash: -371814159 - m_PrefName: Preview_InspectorPreview - m_LastInspectedObjectInstanceID: -1 - m_LastVerticalScrollValue: 0 - m_GlobalObjectId: - m_InspectorMode: 0 - m_LockTracker: - m_IsLocked: 0 - m_PreviewWindow: {fileID: 0}