完善功能

This commit is contained in:
shenjianxing 2025-02-13 11:02:16 +08:00
parent 701f90314c
commit a852f53706
10 changed files with 1052 additions and 52 deletions

View File

@ -285,6 +285,171 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &870632905523093286
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8006785319814741666}
- component: {fileID: 4075577543603496310}
- component: {fileID: 4328347697365083074}
- component: {fileID: 1693119789909609718}
- component: {fileID: 4617060757917449983}
- component: {fileID: 6942968140125767933}
m_Layer: 5
m_Name: Back
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &8006785319814741666
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 870632905523093286}
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: 1082222632210360381}
m_Father: {fileID: 6745244414475164830}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 51, y: -7.184}
m_SizeDelta: {x: 102, y: 34}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &4075577543603496310
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 870632905523093286}
m_CullTransparentMesh: 1
--- !u!114 &4328347697365083074
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 870632905523093286}
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: 21300000, guid: 8c77a2052664d0d4e9be892444deddd1, type: 3}
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 &1693119789909609718
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 870632905523093286}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 0
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: 4328347697365083074}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &4617060757917449983
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 870632905523093286}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName: BtnPrefab
CustomComment:
mComponentName: UnityEngine.UI.Button
--- !u!114 &6942968140125767933
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 870632905523093286}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 10
m_Right: 10
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 1
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &2074544796856548067
GameObject:
m_ObjectHideFlags: 0
@ -604,6 +769,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
Group: {fileID: 2718228497774526170}
PartName: {fileID: 8707609089676575336}
Back: {fileID: 1693119789909609718}
Active: {fileID: 4628810456610151163}
Transparent: {fileID: 5504961664653150937}
Single: {fileID: 5249496382490038150}
@ -742,6 +908,140 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4000529250018397025
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1082222632210360381}
- component: {fileID: 1891213810999579605}
- component: {fileID: 5747162774829074269}
m_Layer: 5
m_Name: Label
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1082222632210360381
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000529250018397025}
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: 8006785319814741666}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 51, y: -17}
m_SizeDelta: {x: 64.01, y: 22.41}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1891213810999579605
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000529250018397025}
m_CullTransparentMesh: 1
--- !u!114 &5747162774829074269
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000529250018397025}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: "\u8FD4\u56DE"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
m_sharedMaterial: {fileID: 168401102475399263, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4630449187609202247
GameObject:
m_ObjectHideFlags: 0
@ -1075,19 +1375,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 492795922963653646}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: UnityEngine.UI.Toggle, UnityEngine.UI
m_MethodName: set_isOn
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_Calls: []
--- !u!114 &2916198659142342703
MonoBehaviour:
m_ObjectHideFlags: 0
@ -1791,6 +2079,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8006785319814741666}
- {fileID: 151921536173276220}
- {fileID: 3825476928833897174}
- {fileID: 8145167937384075785}

View File

@ -121,6 +121,283 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1045717971101313516
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8286140371639898903}
- component: {fileID: 3863386107584933220}
- component: {fileID: 2053569209311400163}
m_Layer: 5
m_Name: Label
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8286140371639898903
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1045717971101313516}
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: 7134505307210740835}
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!222 &3863386107584933220
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1045717971101313516}
m_CullTransparentMesh: 1
--- !u!114 &2053569209311400163
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1045717971101313516}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: "\u62C6\u5206"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
m_sharedMaterial: {fileID: 168401102475399263, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1717582815541303580
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7134505307210740835}
- component: {fileID: 8304021173387577152}
- component: {fileID: 4771545727368447943}
- component: {fileID: 906909365325326697}
- component: {fileID: 4284720363514511568}
m_Layer: 5
m_Name: DragBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7134505307210740835
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1717582815541303580}
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: 8286140371639898903}
- {fileID: 4371217188189964319}
m_Father: {fileID: 3644811849542302248}
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: 102, y: 34}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &8304021173387577152
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1717582815541303580}
m_CullTransparentMesh: 1
--- !u!114 &4771545727368447943
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1717582815541303580}
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: 21300000, guid: 8c77a2052664d0d4e9be892444deddd1, type: 3}
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 &906909365325326697
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1717582815541303580}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName: BtnPrefab
CustomComment:
mComponentName: UnityEngine.UI.Toggle
--- !u!114 &4284720363514511568
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1717582815541303580}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, 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: 4771545727368447943}
toggleTransition: 1
graphic: {fileID: 0}
m_Group: {fileID: 0}
onValueChanged:
m_PersistentCalls:
m_Calls: []
m_IsOn: 0
--- !u!1 &1731373577641860042
GameObject:
m_ObjectHideFlags: 0
@ -355,7 +632,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName:
CustomComponentName: BodyItem
CustomComment:
mComponentName: UnityEngine.UI.Toggle
--- !u!1 &3034960223928596461
@ -470,7 +747,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName:
CustomComponentName: BodyContent
CustomComment:
mComponentName: RectTransform
--- !u!1 &4155433307319882472
@ -578,6 +855,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5601864313735818432}
- {fileID: 3644811849542302248}
- {fileID: 4263527001158670657}
- {fileID: 3238461836348479573}
m_Father: {fileID: 0}
@ -600,6 +878,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
BodyContent: {fileID: 5601864313735818432}
LeftContent: {fileID: 3644811849542302248}
DragBtn: {fileID: 4284720363514511568}
DragBack: {fileID: 540967449707403434}
BodyItem: {fileID: 1682419669064365991}
--- !u!1 &6081794716422948279
GameObject:
@ -735,6 +1016,86 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &6581193976255814611
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3644811849542302248}
- component: {fileID: 2230561609608687225}
- component: {fileID: 5985358514496059563}
m_Layer: 0
m_Name: LeftContent
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3644811849542302248
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6581193976255814611}
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: 7134505307210740835}
m_Father: {fileID: 1062102287437619772}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 84.17078, y: 0}
m_SizeDelta: {x: 168.34167, y: 482.9474}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2230561609608687225
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6581193976255814611}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &5985358514496059563
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6581193976255814611}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName: BodyContent
CustomComment:
mComponentName: RectTransform
--- !u!1 &7452435723576309381
GameObject:
m_ObjectHideFlags: 0
@ -811,3 +1172,275 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8568279820254546874
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5515100320481424769}
- component: {fileID: 6702364684787905386}
- component: {fileID: 1115280453650687482}
m_Layer: 5
m_Name: Label
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5515100320481424769
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8568279820254546874}
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: 4371217188189964319}
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!222 &6702364684787905386
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8568279820254546874}
m_CullTransparentMesh: 1
--- !u!114 &1115280453650687482
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8568279820254546874}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: "\u8FD4\u56DE"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
m_sharedMaterial: {fileID: 168401102475399263, guid: 97936a7b3a86809479ac89371e95b079, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &9171058251630016796
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4371217188189964319}
- component: {fileID: 3785937962185117584}
- component: {fileID: 6961250210721615315}
- component: {fileID: 6058730701352760101}
- component: {fileID: 540967449707403434}
m_Layer: 5
m_Name: DragBack
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &4371217188189964319
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9171058251630016796}
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: 5515100320481424769}
m_Father: {fileID: 7134505307210740835}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 163.2, y: 0}
m_SizeDelta: {x: 102, y: 34}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &3785937962185117584
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9171058251630016796}
m_CullTransparentMesh: 1
--- !u!114 &6961250210721615315
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9171058251630016796}
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: 21300000, guid: 8c77a2052664d0d4e9be892444deddd1, type: 3}
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 &6058730701352760101
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9171058251630016796}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName: BtnPrefab
CustomComment:
mComponentName: UnityEngine.UI.Button
--- !u!114 &540967449707403434
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9171058251630016796}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 6961250210721615315}
m_OnClick:
m_PersistentCalls:
m_Calls: []

View File

@ -3,10 +3,12 @@ using QFramework.Example;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using UnityEngine;
using UnityEngine.EventSystems;
using XMLTool;
using static UnityEditor.Progress;
using static XMLTool.Body3D;
public class Body3DController : MonoSingleton<Body3DController>
{
@ -18,6 +20,7 @@ public class Body3DController : MonoSingleton<Body3DController>
bool selectIsGroup = false;
public List<GameObject> isOnList = new List<GameObject>();
public bool allowDrag = false;
public override void OnSingletonInit()
{
base.OnSingletonInit();
@ -44,6 +47,10 @@ public class Body3DController : MonoSingleton<Body3DController>
ClearObjectToggle();
}
isOnList.Add(selected.obj);
UI3DBodyInfoData data = new UI3DBodyInfoData();
data.body = selected.obj.GetComponent<Body3DOjbItem>().body;
UIKit.OpenPanelAsync<UI3DBodyInfo>(UILevel.PopUI, data).ToAction().Start(this);
}
}
else
@ -53,9 +60,27 @@ public class Body3DController : MonoSingleton<Body3DController>
isOnList.Remove(selected.obj);
selected.obj.GetComponent<ObjectToggle>().Set(false);
}
if (isOnList.Count <= 0)
{
UIKit.HidePanel<UI3DBodyInfo>();
}
}
}
public void Active(bool isActive)
{
foreach (var item in objs)
{
if (isOnList.Contains(item.Key) == false)
{
item.Key.SetActive(isActive);
}
}
}
public void Active(GameObject obj, bool isActive, bool isOther)
{
if (isOther)
@ -64,7 +89,7 @@ public class Body3DController : MonoSingleton<Body3DController>
{
if (item.Key != obj)
{
item.Key.SetActive(isOther);
item.Key.SetActive(isActive);
}
}
}
@ -108,17 +133,21 @@ public class Body3DController : MonoSingleton<Body3DController>
public void Parser(Body3D.Body body)
{
GameObject obj = Utility.FindObj(body.Path);
var bodyObjItem = obj.GetOrAddComponent<Body3DOjbItem>();
bodyObjItem.Init(body);
objs.Add(obj, bodyObjItem);
if (body.subBody != null)
if (body.subBody != null && body.subBody.Count > 0)
{
foreach (var item in body.subBody)
{
Parser(item.Value);
}
}
else
{
GameObject obj = Utility.FindObj(body.Path);
var bodyObjItem = obj.GetOrAddComponent<Body3DOjbItem>();
bodyObjItem.Init(body);
objs.Add(obj, bodyObjItem);
}
}

View File

@ -44,9 +44,8 @@ public struct OnBody3DStart
}
public struct OnBody3DDrag
public struct OnBody3DDragChanged
{
public bool isAllow;
}

View File

@ -8,15 +8,12 @@ using XMLTool;
public class Body3DOjbItem : MonoBehaviour
{
Body3D.Body body;
public Body3D.Body body;
ObjectToggle objToggle;
ObjDrag objDrag;
private void Awake()
{
TypeEventSystem.Global.Register<OnBody3DDrag>(OnBody3DDragHandler);
}
private void OnBody3DDragHandler(OnBody3DDrag drag)
{
}
public void Init(Body3D.Body body)
@ -27,7 +24,7 @@ public class Body3DOjbItem : MonoBehaviour
{
if (body.toggle != null)
{
var objToggle = gameObject.GetOrAddComponent<ObjectToggle>();
objToggle = gameObject.GetOrAddComponent<ObjectToggle>();
ObjectColorToggle colorToggle = null;
if (body.toggle.color != null)
{
@ -38,23 +35,33 @@ public class Body3DOjbItem : MonoBehaviour
objToggle.OnValueChanged.AddListener(isOn =>
{
colorToggle?.SetColor(isOn);
var drag = gameObject.GetOrAddComponent<ObjDrag>();
drag.isOn = isOn;
objDrag = gameObject.GetOrAddComponent<ObjDrag>();
RefreshDrag();
TypeEventSystem.Global.Send<OnBody3DSelected>(new OnBody3DSelected() { isOn = isOn, obj = gameObject });
if (isOn)
{
UI3DBodyInfoData data = new UI3DBodyInfoData();
data.body = body;
UIKit.OpenPanelAsync<UI3DBodyInfo>(UILevel.PopUI, data).ToAction().Start(this);
TypeEventSystem.Global.Register<OnBody3DDragChanged>(OnBody3DDragHandler);
}
else
{
TypeEventSystem.Global.UnRegister<OnBody3DDragChanged>(OnBody3DDragHandler);
}
TypeEventSystem.Global.Send<OnBody3DSelected>(new OnBody3DSelected() { isOn = isOn, obj = gameObject });
});
}
}
}
private void OnBody3DDragHandler(OnBody3DDragChanged drag)
{
RefreshDrag();
}
public void RefreshDrag()
{
if (objToggle != null && objDrag != null)
{
objDrag.isOn = objToggle.isOn && Body3DController.Instance.allowDrag;
}
}
}

View File

@ -28,7 +28,6 @@ public class ObjectToggle : MonoBehaviour
// 检查时间间隔是否大于 0.2 秒
if (clickDuration < 0.2f)
{
// 执行原本 OnMouseUpAsButton 的逻辑
isOn = !isOn;
OnValueChanged?.Invoke(isOn);
}

View File

@ -5,7 +5,7 @@ using QFramework;
namespace QFramework.Example
{
// Generate Id:66f1daf0-51f7-4184-b1fa-8903438d5b48
// Generate Id:6a156460-e46d-43cb-8f5b-c213ad89d195
public partial class UI3DBodyInfo
{
public const string Name = "UI3DBodyInfo";
@ -15,6 +15,8 @@ namespace QFramework.Example
[SerializeField]
public TMPro.TextMeshProUGUI PartName;
[SerializeField]
public UnityEngine.UI.Button Back;
[SerializeField]
public UnityEngine.UI.Toggle Active;
[SerializeField]
public UnityEngine.UI.Toggle Transparent;
@ -29,6 +31,7 @@ namespace QFramework.Example
{
Group = null;
PartName = null;
Back = null;
Active = null;
Transparent = null;
Single = null;

View File

@ -13,14 +13,9 @@ namespace QFramework.Example
}
public partial class UI3DBodyInfo : UIPanel
{
GameObject obj;
protected override void OnInit(IUIData uiData = null)
{
}
protected override void OnOpen(IUIData uiData = null)
{
mData = uiData as UI3DBodyInfoData ?? new UI3DBodyInfoData();
PartName.text = mData.body.Name;
Group.onValueChanged.AddListener(isOn =>
{
TypeEventSystem.Global.Send<OnBody3DGroupTypeChanged>(new OnBody3DGroupTypeChanged() { isGroup = isOn });
@ -34,7 +29,6 @@ namespace QFramework.Example
}
});
GameObject obj = Utility.FindObj(mData.body.Path);
Active.onValueChanged.AddListener(isOn =>
{
obj.SetActive(isOn);
@ -63,7 +57,12 @@ namespace QFramework.Example
Single.onClick.AddListener(() =>
{
Body3DController.Instance.Active(obj, false, true);
Body3DController.Instance.Active(false);
Back.gameObject.SetActive(true);
Active.gameObject.SetActive(false);
Single.gameObject.SetActive(false);
Transparent.gameObject.SetActive(false);
TransparentOther.gameObject.SetActive(false);
});
TransparentOther.onValueChanged.AddListener(isOn =>
{
@ -77,6 +76,25 @@ namespace QFramework.Example
}
Body3DController.Instance.Transparent(obj, isOn, true);
});
Back.onClick.AddListener(() =>
{
Body3DController.Instance.Active(true);
Back.gameObject.SetActive(false);
Active.gameObject.SetActive(true);
Single.gameObject.SetActive(true);
Transparent.gameObject.SetActive(true);
TransparentOther.gameObject.SetActive(true);
});
}
protected override void OnOpen(IUIData uiData = null)
{
mData = uiData as UI3DBodyInfoData ?? new UI3DBodyInfoData();
PartName.text = mData.body.Name;
obj = Utility.FindObj(mData.body.Path);
}
protected override void OnShow()

View File

@ -5,7 +5,7 @@ using QFramework;
namespace QFramework.Example
{
// Generate Id:bebdc4e7-6617-4dcd-b971-e94fd69677e1
// Generate Id:89fda2e5-1471-418f-9925-5b2ab6cfed6d
public partial class UIBody3D
{
public const string Name = "UIBody3D";
@ -13,6 +13,12 @@ namespace QFramework.Example
[SerializeField]
public RectTransform BodyContent;
[SerializeField]
public RectTransform LeftContent;
[SerializeField]
public UnityEngine.UI.Toggle DragBtn;
[SerializeField]
public UnityEngine.UI.Button DragBack;
[SerializeField]
public UnityEngine.UI.Toggle BodyItem;
private UIBody3DData mPrivateData = null;
@ -20,6 +26,9 @@ namespace QFramework.Example
protected override void ClearUIComponents()
{
BodyContent = null;
LeftContent = null;
DragBtn = null;
DragBack = null;
BodyItem = null;
mData = null;

View File

@ -17,7 +17,20 @@ namespace QFramework.Example
{
protected override void OnInit(IUIData uiData = null)
{
// please add init code here
DragBtn.onValueChanged.AddListener(isOn =>
{
if (isOn)
{
DragBack.gameObject.SetActive(true);
}
Body3DController.Instance.allowDrag = isOn;
TypeEventSystem.Global.Send<OnBody3DDragChanged>();
});
DragBack.onClick.AddListener(() =>
{
DragBtn.isOn = false;
DragBack.gameObject.SetActive(false);
});
}
protected override void OnOpen(IUIData uiData = null)
@ -39,6 +52,7 @@ namespace QFramework.Example
obj.SetActive(isOn);
});
}
}
protected override void OnShow()