9.4
This commit is contained in:
parent
b8aa7a3fb2
commit
5de95508cb
GQ_TongXin/Assets
Prefabs/Prefabs/告警图标
Scenes
Scripts
WebGLSupport.metaWebGLSupport
WebGLInput.meta
WebGLInput
Detail.meta
WebGLWindow.metaDetail
Mobile.metaMobile
WebGLInput.csWebGLInput.cs.metaWebGLInput.jslibWebGLInput.jslib.metaWrapper.metaWrapper
WebGLWindow
font
packages.configscript
|
@ -38,7 +38,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 83.34, y: 20.46}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &4017683969205238466
|
||||
CanvasRenderer:
|
||||
|
@ -601,82 +601,6 @@ MonoBehaviour:
|
|||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &3170989633102458883
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4403525452504092535}
|
||||
- component: {fileID: 6166363796708492946}
|
||||
- component: {fileID: 1367990253539138308}
|
||||
m_Layer: 5
|
||||
m_Name: "Image_\u8B66\u62A5\u56FE\u6807\u7EA2"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4403525452504092535
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3170989633102458883}
|
||||
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: 6112714208937876466}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 13.5, y: 0.000030517578}
|
||||
m_SizeDelta: {x: 27, y: 28}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6166363796708492946
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3170989633102458883}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1367990253539138308
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3170989633102458883}
|
||||
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: f041e5ff947c29341a9e64018bf90b4a, 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!1 &4555178148983680983
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1452,53 +1376,6 @@ MonoBehaviour:
|
|||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!1 &6112714208134077144
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6112714208134077147}
|
||||
- component: {fileID: 6112714208134077146}
|
||||
m_Layer: 5
|
||||
m_Name: "Panel_\u7EA2\u8272\u544A\u8B66"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &6112714208134077147
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6112714208134077144}
|
||||
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: 6112714208937876466}
|
||||
- {fileID: 2642138567435854485}
|
||||
m_Father: {fileID: 8800034579725163021}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 182.5, y: -31.5}
|
||||
m_SizeDelta: {x: 365, y: 63}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6112714208134077146
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6112714208134077144}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &6112714208459881770
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1576,157 +1453,6 @@ MonoBehaviour:
|
|||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &6112714208937876467
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6112714208937876466}
|
||||
- component: {fileID: 6112714208937876476}
|
||||
- component: {fileID: 6112714208937876477}
|
||||
- component: {fileID: 2714189522183764141}
|
||||
m_Layer: 5
|
||||
m_Name: "Text (TMP)_\u544A\u8B66\u7C7B\u578B"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6112714208937876466
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6112714208937876467}
|
||||
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: 4403525452504092535}
|
||||
m_Father: {fileID: 6112714208134077147}
|
||||
m_RootOrder: 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: -143.3, y: 21.748367}
|
||||
m_SizeDelta: {x: 79.43, y: 18.01}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &6112714208937876476
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6112714208937876467}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6112714208937876477
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6112714208937876467}
|
||||
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: HARD-8AD
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: bc33625c39f9eef41a0dc90cc0dee2f2, type: 2}
|
||||
m_sharedMaterial: {fileID: -8092961139225985143, guid: 49d215feaf9737b4b99940428ab34824, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4282598143
|
||||
m_fontColor: {r: 1, g: 0.25882354, b: 0.2627451, 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: 15
|
||||
m_fontSizeBase: 15
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
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: 1
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &2714189522183764141
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6112714208937876467}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &6112714208998125978
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2063,141 +1789,6 @@ MonoBehaviour:
|
|||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Button
|
||||
--- !u!1 &7007716200540103299
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7712273883454834239}
|
||||
- component: {fileID: 3862044961892419484}
|
||||
- component: {fileID: 2151594234328684876}
|
||||
m_Layer: 5
|
||||
m_Name: "Text (TMP)_\u65F6\u95F4"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7712273883454834239
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7007716200540103299}
|
||||
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: 2642138567435854485}
|
||||
m_RootOrder: 1
|
||||
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: 18.75, y: -9.5}
|
||||
m_SizeDelta: {x: 321.5, y: 19.5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3862044961892419484
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7007716200540103299}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2151594234328684876
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7007716200540103299}
|
||||
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: "\u65F6\u95F4\uFF1A2022-07-28 01 : 40 : 41"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: bc33625c39f9eef41a0dc90cc0dee2f2, type: 2}
|
||||
m_sharedMaterial: {fileID: -9131975756498823584, guid: 0cc1dcff8121b7a43bb34de37b73ff0a, 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: 10
|
||||
m_fontSizeBase: 10
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
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: 1
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &7681370149819859206
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2210,6 +1801,7 @@ GameObject:
|
|||
- component: {fileID: 7020884873726396866}
|
||||
- component: {fileID: 7471378666676716066}
|
||||
- component: {fileID: 7586751718064170127}
|
||||
- component: {fileID: 2916424009422745285}
|
||||
m_Layer: 5
|
||||
m_Name: Button (Legacy)
|
||||
m_TagString: Untagged
|
||||
|
@ -2233,12 +1825,12 @@ RectTransform:
|
|||
- {fileID: 442496461516659038}
|
||||
- {fileID: 5232969610057933956}
|
||||
m_Father: {fileID: 8800034579725163021}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 0
|
||||
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_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 23, y: 0}
|
||||
m_SizeDelta: {x: 315.15, y: 63}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &7020884873726396866
|
||||
CanvasRenderer:
|
||||
|
@ -2322,219 +1914,22 @@ MonoBehaviour:
|
|||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &8417247118530235885
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6605642349635155404}
|
||||
- component: {fileID: 8199769139235157343}
|
||||
- component: {fileID: 179449174510585852}
|
||||
m_Layer: 5
|
||||
m_Name: "Text (TMP)_\u5BF9\u8C61"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6605642349635155404
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8417247118530235885}
|
||||
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: 2642138567435854485}
|
||||
m_RootOrder: 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: 18.75, y: 9.75}
|
||||
m_SizeDelta: {x: 321.5, y: 19.5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8199769139235157343
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8417247118530235885}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &179449174510585852
|
||||
--- !u!114 &2916424009422745285
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8417247118530235885}
|
||||
m_GameObject: {fileID: 7681370149819859206}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: da52e9a478b91ab4db59a49f49bbe5a7, 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: "\u5BF9\u8C61\uFF1A110KV\u5B8B\u7126\u53D8ZXMPS385-1\u684667\u69FD1\u677F"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: bc33625c39f9eef41a0dc90cc0dee2f2, type: 2}
|
||||
m_sharedMaterial: {fileID: -9131975756498823584, guid: 0cc1dcff8121b7a43bb34de37b73ff0a, 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: 10
|
||||
m_fontSizeBase: 10
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
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: 1
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &8612442674409928247
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2642138567435854485}
|
||||
- component: {fileID: 1942174164385627139}
|
||||
- component: {fileID: 4341746228521590431}
|
||||
m_Layer: 5
|
||||
m_Name: "Image_\u65F6\u95F4\u548C\u5BF9\u8C61"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2642138567435854485
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8612442674409928247}
|
||||
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: 6605642349635155404}
|
||||
- {fileID: 7712273883454834239}
|
||||
m_Father: {fileID: 6112714208134077147}
|
||||
m_RootOrder: 1
|
||||
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: -12.003357}
|
||||
m_SizeDelta: {x: 359, y: 39}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1942174164385627139
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8612442674409928247}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4341746228521590431
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8612442674409928247}
|
||||
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: a43662d754c3cf247860298a7a14013e, 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
|
||||
Alarm_img: {fileID: 3071485523550046684}
|
||||
Alarm_type: {fileID: 3044897399251390898}
|
||||
Alarm_name: {fileID: 2198172523802410261}
|
||||
Alarm_time: {fileID: 7704237082279806242}
|
||||
--- !u!1 &8800034578622938698
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3059,7 +2454,6 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6112714208134077147}
|
||||
- {fileID: 7270231214890032694}
|
||||
m_Father: {fileID: 8800034579198215129}
|
||||
m_RootOrder: 0
|
||||
|
@ -3403,7 +2797,7 @@ MonoBehaviour:
|
|||
m_Elasticity: 0.1
|
||||
m_Inertia: 1
|
||||
m_DecelerationRate: 0.135
|
||||
m_ScrollSensitivity: 1
|
||||
m_ScrollSensitivity: 20
|
||||
m_Viewport: {fileID: 8800034579198215129}
|
||||
m_HorizontalScrollbar: {fileID: 8800034579191869755}
|
||||
m_VerticalScrollbar: {fileID: 8800034579660353738}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -148,34 +148,50 @@ public class CameraRT : MonoBehaviour
|
|||
Vector3 rot = Vector3.zero;
|
||||
Vector3 pos_target = Vector3.zero;
|
||||
//Vector3 rot_target = Vector3.zero;
|
||||
switch (ExtendedFlycam.Inst.room)
|
||||
if (CabinetUIManager.Instance.current_menu != Menu.M_数字孪生_智能巡检)
|
||||
{
|
||||
case ExtendedFlycam.Room.None:
|
||||
{
|
||||
pos = camera_init_position;
|
||||
rot = camera_init_eulerAngles;
|
||||
pos_target = target_init_position;
|
||||
}
|
||||
break;
|
||||
case ExtendedFlycam.Room.机房:
|
||||
{
|
||||
pos = new Vector3(9.53f, 15.23f, -5.71f);
|
||||
rot = new Vector3(67.072f, 180, 0);
|
||||
pos_target = new Vector3(9.67f, -3.9f, -13.5f);
|
||||
}
|
||||
break;
|
||||
case ExtendedFlycam.Room.配电室:
|
||||
{
|
||||
pos = new Vector3(-4.09f, 14.52f, -6.4085f);
|
||||
rot = new Vector3(67.072f, 180, 0);
|
||||
pos_target = new Vector3(-4.09f, -3.9f, -14.2f);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
switch (ExtendedFlycam.Inst.room)
|
||||
{
|
||||
case ExtendedFlycam.Room.None:
|
||||
{
|
||||
pos = camera_init_position;
|
||||
rot = camera_init_eulerAngles;
|
||||
pos_target = target_init_position;
|
||||
}
|
||||
break;
|
||||
case ExtendedFlycam.Room.机房:
|
||||
{
|
||||
pos = new Vector3(9.53f, 15.23f, -5.71f);
|
||||
rot = new Vector3(67.072f, 180, 0);
|
||||
pos_target = new Vector3(9.67f, -3.9f, -13.5f);
|
||||
}
|
||||
break;
|
||||
case ExtendedFlycam.Room.配电室:
|
||||
{
|
||||
pos = new Vector3(-4.09f, 14.52f, -6.4085f);
|
||||
rot = new Vector3(67.072f, 180, 0);
|
||||
pos_target = new Vector3(-4.09f, -3.9f, -14.2f);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ExtendedFlycam.Inst.room)
|
||||
{
|
||||
case ExtendedFlycam.Room.None:
|
||||
break;
|
||||
case ExtendedFlycam.Room.机房:
|
||||
break;
|
||||
case ExtendedFlycam.Room.配电室:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
DOTween.Kill(transform, false);
|
||||
DOTween.Kill(cameraTransform, false);
|
||||
|
@ -225,8 +241,9 @@ public class CameraRT : MonoBehaviour
|
|||
Vector3 pos = Vector3.zero;
|
||||
Vector3 rot = Vector3.zero;
|
||||
Vector3 pos_target = Vector3.zero;
|
||||
float _x=110;float _y = 15;
|
||||
float _x = 110; float _y = 15;
|
||||
//Vector3 rot_target = Vector3.zero;
|
||||
|
||||
switch (ExtendedFlycam.Inst.room)
|
||||
{
|
||||
case ExtendedFlycam.Room.None:
|
||||
|
|
|
@ -16,8 +16,14 @@ public class CabinetUIManager : MonoBehaviour
|
|||
|
||||
public List<TransparentGlow> transparentGlows_list = new List<TransparentGlow>();
|
||||
|
||||
/// <summary>
|
||||
/// 机柜所有高亮
|
||||
/// </summary>
|
||||
[Header("机柜所有高亮")]
|
||||
public List<GameObject> cabine_hights;
|
||||
/// <summary>
|
||||
/// 当前机柜高亮
|
||||
/// </summary>
|
||||
[Header("当前机柜高亮")]
|
||||
public List<GameObject> cabine_hights_now;
|
||||
|
||||
|
@ -27,6 +33,11 @@ public class CabinetUIManager : MonoBehaviour
|
|||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
public void init()
|
||||
{
|
||||
door_list = GetComponentsInChildren<Door>(true).ToList();
|
||||
cabinet_ui_base_list = GetComponentsInChildren<CabinetUIBase>(true).ToList();
|
||||
|
@ -109,5 +120,6 @@ public enum Menu
|
|||
M_数字孪生_智能巡检,
|
||||
M_数字孪生_线缆组配置,
|
||||
M_全景监控_烟感,
|
||||
M_全景监控_水浸,
|
||||
None
|
||||
}
|
|
@ -15,12 +15,15 @@ public class SpUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|||
public Sprite shidu_selected;
|
||||
public Sprite yangan_normal;
|
||||
public Sprite yangan_selected;
|
||||
public Sprite shuijin_normal;
|
||||
public Sprite shuijin_selected;
|
||||
|
||||
public Image expand_image;
|
||||
|
||||
public Sprite wendu_expand;
|
||||
public Sprite shidu_expand;
|
||||
public Sprite yangan_expand;
|
||||
public Sprite shuijin_expand;
|
||||
|
||||
public TextMeshProUGUI textMeshPro;
|
||||
public Text text;
|
||||
|
@ -57,6 +60,14 @@ public class SpUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|||
text.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_Y.collectResult;
|
||||
}
|
||||
break;
|
||||
case "Ë®½þ":
|
||||
{
|
||||
my_image.sprite = shuijin_selected;
|
||||
expand_image.sprite = shuijin_expand;
|
||||
textMeshPro.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_J.collectResult;
|
||||
text.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_J.collectResult;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -77,6 +88,9 @@ public class SpUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|||
case "Ñ̸Ð":
|
||||
my_image.sprite = yangan_normal;
|
||||
break;
|
||||
case "Ë®½þ":
|
||||
my_image.sprite = shuijin_normal;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -115,18 +129,25 @@ public class SpUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|||
if (string.IsNullOrEmpty(_a)) transform.parent.parent.gameObject.SetActive(false);
|
||||
}
|
||||
break;
|
||||
case "Ë®½þ":
|
||||
{
|
||||
_a = temperatureAndHumidity.parent.GetComponent<ENVQuery>().eNVList_J.collectResult;
|
||||
my_image.sprite = shuijin_normal;
|
||||
if (string.IsNullOrEmpty(_a)) transform.parent.parent.gameObject.SetActive(false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (string.IsNullOrEmpty(_a)) {
|
||||
|
||||
if (string.IsNullOrEmpty(_a))
|
||||
{
|
||||
if (transform.parent.parent.name == "ÎÂʪ¶È")
|
||||
{
|
||||
transform.parent.parent.gameObject.SetActive(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (TemperatureAndHumidity.current_state != "Ñ̸Ð")
|
||||
if (TemperatureAndHumidity.current_state != "Ñ̸Ð" && TemperatureAndHumidity.current_state != "Ë®½þ")
|
||||
{
|
||||
var a = string.IsNullOrEmpty(_a) ? "0" : _a;
|
||||
var max = string.IsNullOrEmpty(_max) ? "0" : _max;
|
||||
|
@ -146,7 +167,7 @@ public class SpUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|||
}
|
||||
else
|
||||
{
|
||||
my_image.color = hightC;
|
||||
my_image.color = hightC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,11 +60,16 @@ public class TemperatureAndHumidity : CabinetUIBase
|
|||
gameObject.SetActive(true);
|
||||
ChangeState("ĘŞśČ");
|
||||
}
|
||||
else if (menu == Menu.M_全景监控_烟感)
|
||||
else if (menu == Menu.M_全景监控_烟感)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
ChangeState("Ń̸Đ");
|
||||
}
|
||||
else if (menu == Menu.M_全景监控_水浸)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
ChangeState("水浸");
|
||||
}
|
||||
else
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
|
|
|
@ -61,20 +61,8 @@ public class UIToCabinet : MonoBehaviour
|
|||
var index = i;
|
||||
toggles[i].onValueChanged.AddListener((ison) =>
|
||||
{
|
||||
GameManager.Inst.power_close();
|
||||
GameManager.Inst.objectToShow_add.SetActive(false);
|
||||
GameManager.Inst.stagingPanel.SetActive(false);
|
||||
GameManager.Inst.editorMenu.gameObject.SetActive(false);
|
||||
|
||||
rongLaing.SetActive(false);
|
||||
FloorController.Inst.FloorNormal();
|
||||
CreateLine createLine = PatternChoose.Inst.transform.Find("画线").GetComponent<CreateLine>();
|
||||
LineGroupManager.Instance.HidePanel();
|
||||
|
||||
for (int i = 0; i < GameManager.Inst.pop_ups.Count; i++)
|
||||
{
|
||||
GameManager.Inst.pop_ups[i].SetActive(false);
|
||||
}
|
||||
UI_init();
|
||||
if (ison)
|
||||
{
|
||||
Debug.Log("第" + index);
|
||||
|
@ -93,7 +81,6 @@ public class UIToCabinet : MonoBehaviour
|
|||
GameManager.Inst.search_box.SetActive(true);
|
||||
CabinetUIManager.ChangeMenu(Menu.M_全景监控_设备告警);
|
||||
}));
|
||||
|
||||
}
|
||||
break;
|
||||
case "Toggle_全景监控":
|
||||
|
@ -245,6 +232,14 @@ public class UIToCabinet : MonoBehaviour
|
|||
CabinetUIManager.ChangeMenu(Menu.M_全景监控_烟感);
|
||||
}
|
||||
break;
|
||||
case "Toggle_水浸":
|
||||
{
|
||||
init(Menu.M_全景监控_水浸);
|
||||
ExtendedFlycam.Inst.QuanJing();
|
||||
PatternChoose.Inst.transform.Find("Panel搜索框").GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.机柜);
|
||||
CabinetUIManager.ChangeMenu(Menu.M_全景监控_水浸);
|
||||
}
|
||||
break;
|
||||
case "Toggle_线缆连接展示":
|
||||
{
|
||||
init(Menu.M_数字孪生_线缆连接_展示);
|
||||
|
@ -289,18 +284,54 @@ public class UIToCabinet : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按键切换初始化
|
||||
/// </summary>
|
||||
public void UI_init()
|
||||
{
|
||||
GameManager.Inst.power_close();
|
||||
GameManager.Inst.objectToShow_add.SetActive(false);
|
||||
GameManager.Inst.stagingPanel.SetActive(false);
|
||||
GameManager.Inst.editorMenu.gameObject.SetActive(false);
|
||||
|
||||
rongLaing.SetActive(false);
|
||||
FloorController.Inst.FloorNormal();
|
||||
|
||||
LineGroupManager.Instance.HidePanel();
|
||||
|
||||
for (int i = 0; i < GameManager.Inst.pop_ups.Count; i++)
|
||||
{
|
||||
GameManager.Inst.pop_ups[i].SetActive(false);
|
||||
}
|
||||
|
||||
for (int i = 0; i < CabinetUIManager.Instance.cabinet_ui_base_list.Count; i++)
|
||||
{
|
||||
if (CabinetUIManager.Instance.cabinet_ui_base_list[i].gameObject.activeSelf &&
|
||||
CabinetUIManager.Instance.cabinet_ui_base_list[i].gameObject.name != "智能巡检")
|
||||
{
|
||||
CabinetUIManager.Instance.cabinet_ui_base_list[i].gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator Loadinfo(Menu menu, Action<string> callback)
|
||||
{
|
||||
if (menu == Menu.M_全景监控_温度)
|
||||
{
|
||||
yield return StartCoroutine(GameManager.Inst.init_ENV());
|
||||
GameManager.Inst.Load_ENV();
|
||||
callback?.Invoke("1");
|
||||
yield return StartCoroutine(GameManager.Inst.init_ENV((x) =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(x))
|
||||
return;
|
||||
GameManager.Inst.Load_ENV();
|
||||
callback?.Invoke("1");
|
||||
}));
|
||||
}
|
||||
else if (menu == Menu.M_全景监控_设备告警)
|
||||
{
|
||||
yield return StartCoroutine(GameManager.Inst.init_TmsAlarm((x) =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(x))
|
||||
return;
|
||||
GameManager.Inst.Load_TmsAlarm();
|
||||
callback?.Invoke("1");
|
||||
}));
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 19b231dc2e1ab5e47bb801e8853f659a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 23d83eab8f753b04fb7f1384ac6676a0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dd840bb14379149498902237a63bb794
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,64 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WebGLSupport.Detail
|
||||
{
|
||||
public class RebuildChecker
|
||||
{
|
||||
IInputField input;
|
||||
|
||||
string beforeString;
|
||||
int beforeCaretPosition;
|
||||
int beforeSelectionFocusPosition;
|
||||
int beforeSelectionAnchorPosition;
|
||||
//Vector2 anchoredPosition;
|
||||
|
||||
public RebuildChecker(IInputField input)
|
||||
{
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
public bool NeedRebuild(bool debug = false)
|
||||
{
|
||||
var res = false;
|
||||
|
||||
// any not same
|
||||
if (beforeString != input.text)
|
||||
{
|
||||
if(debug) Debug.Log(string.Format("beforeString : {0} != {1}", beforeString, input.text));
|
||||
beforeString = input.text;
|
||||
res = true;
|
||||
}
|
||||
|
||||
if (beforeCaretPosition != input.caretPosition)
|
||||
{
|
||||
if (debug) Debug.Log(string.Format("beforeCaretPosition : {0} != {1}", beforeCaretPosition, input.caretPosition));
|
||||
beforeCaretPosition = input.caretPosition;
|
||||
res = true;
|
||||
}
|
||||
|
||||
if (beforeSelectionFocusPosition != input.selectionFocusPosition)
|
||||
{
|
||||
if (debug) Debug.Log(string.Format("beforeSelectionFocusPosition : {0} != {1}", beforeSelectionFocusPosition, input.selectionFocusPosition));
|
||||
beforeSelectionFocusPosition = input.selectionFocusPosition;
|
||||
res = true;
|
||||
}
|
||||
|
||||
if (beforeSelectionAnchorPosition != input.selectionAnchorPosition)
|
||||
{
|
||||
if (debug) Debug.Log(string.Format("beforeSelectionAnchorPosition : {0} != {1}", beforeSelectionAnchorPosition, input.selectionAnchorPosition));
|
||||
beforeSelectionAnchorPosition = input.selectionAnchorPosition;
|
||||
res = true;
|
||||
}
|
||||
|
||||
//if (anchoredPosition != input.TextComponentRectTransform().anchoredPosition)
|
||||
//{
|
||||
// if (debug) Debug.Log(string.Format("anchoredPosition : {0} != {1}", anchoredPosition, input.TextComponentRectTransform().anchoredPosition));
|
||||
// anchoredPosition = input.TextComponentRectTransform().anchoredPosition;
|
||||
// res = true;
|
||||
//}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3cb8b49a6bee2384b888ba951eb2bdbd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8fcb4aaeec72ef54486eff0172891c0b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,87 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using System.Runtime.InteropServices; // for DllImport
|
||||
using AOT;
|
||||
using System;
|
||||
|
||||
namespace WebGLSupport
|
||||
{
|
||||
class WebGLInputMobilePlugin
|
||||
{
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
[DllImport("__Internal")]
|
||||
public static extern int WebGLInputMobileRegister(Action<int> OnTouchEnd);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputMobileOnFocusOut(int id, Action<int> OnFocusOut);
|
||||
#else
|
||||
/// <summary>
|
||||
/// ID を割り振り
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int WebGLInputMobileRegister(Action<int> OnTouchEnd) { return 0; }
|
||||
|
||||
public static void WebGLInputMobileOnFocusOut(int id, Action<int> OnFocusOut) {}
|
||||
#endif
|
||||
}
|
||||
|
||||
public class WebGLInputMobile : MonoBehaviour, IPointerDownHandler
|
||||
{
|
||||
static Dictionary<int, WebGLInputMobile> instances = new Dictionary<int, WebGLInputMobile>();
|
||||
|
||||
int id = -1;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
#if !(UNITY_WEBGL && !UNITY_EDITOR)
|
||||
// WebGL 以外、更新メソッドは動作しないようにします
|
||||
enabled = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 押されたら、touchend イベントを登録する
|
||||
/// </summary>
|
||||
/// <param name="eventData"></param>
|
||||
public void OnPointerDown(PointerEventData eventData)
|
||||
{
|
||||
if (id != -1) return;
|
||||
id = WebGLInputMobilePlugin.WebGLInputMobileRegister(OnTouchEnd);
|
||||
instances[id] = this;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action<int>))]
|
||||
static void OnTouchEnd(int id)
|
||||
{
|
||||
var @this = instances[id];
|
||||
@this.GetComponent<WebGLInput>().OnSelect();
|
||||
@this.StartCoroutine(RegisterOnFocusOut(id));
|
||||
}
|
||||
|
||||
static IEnumerator RegisterOnFocusOut(int id)
|
||||
{
|
||||
yield return null; // wait one frame.
|
||||
WebGLInputMobilePlugin.WebGLInputMobileOnFocusOut(id, OnFocusOut);
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action<int>))]
|
||||
static void OnFocusOut(int id)
|
||||
{
|
||||
var @this = instances[id];
|
||||
@this.StartCoroutine(ExecFocusOut(id));
|
||||
}
|
||||
|
||||
static IEnumerator ExecFocusOut(int id)
|
||||
{
|
||||
yield return null; // wait one frame.
|
||||
var @this = instances[id];
|
||||
@this.GetComponent<WebGLInput>().DeactivateInputField();
|
||||
// release
|
||||
@this.id = -1;
|
||||
instances.Remove(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 56393f797a0f7e94e95547f5052052a4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,23 @@
|
|||
var WebGLInputMobile = {
|
||||
$instances: [],
|
||||
|
||||
WebGLInputMobileRegister: function (touchend) {
|
||||
var id = instances.push(null) - 1;
|
||||
|
||||
document.body.addEventListener("touchend", function () {
|
||||
document.body.removeEventListener("touchend", arguments.callee);
|
||||
Runtime.dynCall("vi", touchend, [id]);
|
||||
});
|
||||
|
||||
return id;
|
||||
},
|
||||
WebGLInputMobileOnFocusOut: function (id, focusout) {
|
||||
document.body.addEventListener("focusout", function () {
|
||||
document.body.removeEventListener("focusout", arguments.callee);
|
||||
Runtime.dynCall("vi", focusout, [id]);
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
autoAddDeps(WebGLInputMobile, '$instances');
|
||||
mergeInto(LibraryManager.library, WebGLInputMobile);
|
|
@ -0,0 +1,34 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4df3633103619754fb77d82a1d683868
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Facebook: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,454 @@
|
|||
#if UNITY_2018_2_OR_NEWER
|
||||
#define TMP_WEBGL_SUPPORT
|
||||
#endif
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
using AOT;
|
||||
using System.Runtime.InteropServices; // for DllImport
|
||||
using System.Collections;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace WebGLSupport
|
||||
{
|
||||
internal class WebGLInputPlugin
|
||||
{
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputInit();
|
||||
[DllImport("__Internal")]
|
||||
public static extern int WebGLInputCreate(string canvasId, int x, int y, int width, int height, int fontsize, string text, string placeholder, bool isMultiLine, bool isPassword, bool isHidden, bool isMobile);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputEnterSubmit(int id, bool flag);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputTab(int id, Action<int, int> cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputFocus(int id);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputOnFocus(int id, Action<int> cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputOnBlur(int id, Action<int> cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputOnValueChange(int id, Action<int, string> cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputOnEditEnd(int id, Action<int, string> cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern int WebGLInputSelectionStart(int id);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern int WebGLInputSelectionEnd(int id);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern int WebGLInputSelectionDirection(int id);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputSetSelectionRange(int id, int start, int end);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputMaxLength(int id, int maxlength);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputText(int id, string text);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern bool WebGLInputIsFocus(int id);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputDelete(int id);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputForceBlur(int id);
|
||||
|
||||
#if WEBGLINPUT_TAB
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLInputEnableTabText(int id, bool enable);
|
||||
#endif
|
||||
#else
|
||||
public static void WebGLInputInit() {}
|
||||
public static int WebGLInputCreate(string canvasId, int x, int y, int width, int height, int fontsize, string text, string placeholder, bool isMultiLine, bool isPassword, bool isHidden, bool isMobile) { return 0; }
|
||||
public static void WebGLInputEnterSubmit(int id, bool flag) { }
|
||||
public static void WebGLInputTab(int id, Action<int, int> cb) { }
|
||||
public static void WebGLInputFocus(int id) { }
|
||||
public static void WebGLInputOnFocus(int id, Action<int> cb) { }
|
||||
public static void WebGLInputOnBlur(int id, Action<int> cb) { }
|
||||
public static void WebGLInputOnValueChange(int id, Action<int, string> cb) { }
|
||||
public static void WebGLInputOnEditEnd(int id, Action<int, string> cb) { }
|
||||
public static int WebGLInputSelectionStart(int id) { return 0; }
|
||||
public static int WebGLInputSelectionEnd(int id) { return 0; }
|
||||
public static int WebGLInputSelectionDirection(int id) { return 0; }
|
||||
public static void WebGLInputSetSelectionRange(int id, int start, int end) { }
|
||||
public static void WebGLInputMaxLength(int id, int maxlength) { }
|
||||
public static void WebGLInputText(int id, string text) { }
|
||||
public static bool WebGLInputIsFocus(int id) { return false; }
|
||||
public static void WebGLInputDelete(int id) { }
|
||||
public static void WebGLInputForceBlur(int id) { }
|
||||
|
||||
#if WEBGLINPUT_TAB
|
||||
public static void WebGLInputEnableTabText(int id, bool enable) { }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
public class WebGLInput : MonoBehaviour, IComparable<WebGLInput>
|
||||
{
|
||||
static Dictionary<int, WebGLInput> instances = new Dictionary<int, WebGLInput>();
|
||||
public static string CanvasId { get; set; }
|
||||
|
||||
#if WEBGLINPUT_TAB
|
||||
public bool enableTabText = false;
|
||||
#endif
|
||||
|
||||
static WebGLInput()
|
||||
{
|
||||
CanvasId = WebGLWindow.GetCanvasName();
|
||||
WebGLInputPlugin.WebGLInputInit();
|
||||
}
|
||||
public int Id { get { return id; } }
|
||||
internal int id = -1;
|
||||
public IInputField input;
|
||||
bool blurBlock = false;
|
||||
|
||||
[TooltipAttribute("show input element on canvas. this will make you select text by drag.")]
|
||||
public bool showHtmlElement = false;
|
||||
|
||||
private IInputField Setup()
|
||||
{
|
||||
if (GetComponent<InputField>()) return new WrappedInputField(GetComponent<InputField>());
|
||||
#if TMP_WEBGL_SUPPORT
|
||||
if (GetComponent<TMPro.TMP_InputField>()) return new WrappedTMPInputField(GetComponent<TMPro.TMP_InputField>());
|
||||
#endif // TMP_WEBGL_SUPPORT
|
||||
throw new Exception("Can not Setup WebGLInput!!");
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
input = Setup();
|
||||
#if !(UNITY_WEBGL && !UNITY_EDITOR)
|
||||
// WebGL 以外、更新メソッドは動作しないようにします
|
||||
enabled = false;
|
||||
#endif
|
||||
// モバイルの入力対応
|
||||
if (Application.isMobilePlatform)
|
||||
{
|
||||
gameObject.AddComponent<WebGLInputMobile>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the element rect of input
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
RectInt GetElemetRect()
|
||||
{
|
||||
var rect = GetScreenCoordinates(input.RectTransform());
|
||||
// モバイルの場合、強制表示する
|
||||
if (showHtmlElement || Application.isMobilePlatform)
|
||||
{
|
||||
var x = (int)(rect.x);
|
||||
var y = (int)(Screen.height - (rect.y + rect.height));
|
||||
return new RectInt(x, y, (int)rect.width, (int)rect.height);
|
||||
}
|
||||
else
|
||||
{
|
||||
var x = (int)(rect.x);
|
||||
var y = (int)(Screen.height - (rect.y));
|
||||
return new RectInt(x, y, (int)rect.width, (int)1);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 対象が選択されたとき
|
||||
/// </summary>
|
||||
/// <param name="eventData"></param>
|
||||
public void OnSelect()
|
||||
{
|
||||
if (id != -1) throw new Exception("OnSelect : id != -1");
|
||||
|
||||
var rect = GetElemetRect();
|
||||
bool isPassword = input.contentType == ContentType.Password;
|
||||
|
||||
var fontSize = Mathf.Max(14, input.fontSize); // limit font size : 14 !!
|
||||
|
||||
// モバイルの場合、強制表示する
|
||||
var isHidden = !(showHtmlElement || Application.isMobilePlatform);
|
||||
id = WebGLInputPlugin.WebGLInputCreate(WebGLInput.CanvasId, rect.x, rect.y, rect.width, rect.height, fontSize, input.text, input.placeholder, input.lineType != LineType.SingleLine, isPassword, isHidden, Application.isMobilePlatform);
|
||||
|
||||
instances[id] = this;
|
||||
WebGLInputPlugin.WebGLInputEnterSubmit(id, input.lineType != LineType.MultiLineNewline);
|
||||
WebGLInputPlugin.WebGLInputOnFocus(id, OnFocus);
|
||||
WebGLInputPlugin.WebGLInputOnBlur(id, OnBlur);
|
||||
WebGLInputPlugin.WebGLInputOnValueChange(id, OnValueChange);
|
||||
WebGLInputPlugin.WebGLInputOnEditEnd(id, OnEditEnd);
|
||||
WebGLInputPlugin.WebGLInputTab(id, OnTab);
|
||||
// default value : https://www.w3schools.com/tags/att_input_maxlength.asp
|
||||
WebGLInputPlugin.WebGLInputMaxLength(id, (input.characterLimit > 0) ? input.characterLimit : 524288);
|
||||
WebGLInputPlugin.WebGLInputFocus(id);
|
||||
#if WEBGLINPUT_TAB
|
||||
WebGLInputPlugin.WebGLInputEnableTabText(id, enableTabText);
|
||||
#endif
|
||||
if (input.OnFocusSelectAll)
|
||||
{
|
||||
WebGLInputPlugin.WebGLInputSetSelectionRange(id, 0, input.text.Length);
|
||||
}
|
||||
|
||||
WebGLWindow.OnBlurEvent += OnWindowBlur;
|
||||
}
|
||||
|
||||
void OnWindowBlur()
|
||||
{
|
||||
blurBlock = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 画面内の描画範囲を取得する
|
||||
/// </summary>
|
||||
/// <param name="uiElement"></param>
|
||||
/// <returns></returns>
|
||||
Rect GetScreenCoordinates(RectTransform uiElement)
|
||||
{
|
||||
var worldCorners = new Vector3[4];
|
||||
uiElement.GetWorldCorners(worldCorners);
|
||||
|
||||
// try to support RenderMode:WorldSpace
|
||||
var canvas = uiElement.GetComponentInParent<Canvas>();
|
||||
var useCamera = (canvas.renderMode != RenderMode.ScreenSpaceOverlay);
|
||||
if (canvas && useCamera)
|
||||
{
|
||||
var camera = canvas.worldCamera;
|
||||
if (!camera) camera = Camera.main;
|
||||
|
||||
for (var i = 0; i < worldCorners.Length; i++)
|
||||
{
|
||||
worldCorners[i] = camera.WorldToScreenPoint(worldCorners[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var min = new Vector3(float.MaxValue, float.MaxValue);
|
||||
var max = new Vector3(float.MinValue, float.MinValue);
|
||||
for (var i = 0; i < worldCorners.Length; i++)
|
||||
{
|
||||
min.x = Mathf.Min(min.x, worldCorners[i].x);
|
||||
min.y = Mathf.Min(min.y, worldCorners[i].y);
|
||||
max.x = Mathf.Max(max.x, worldCorners[i].x);
|
||||
max.y = Mathf.Max(max.y, worldCorners[i].y);
|
||||
}
|
||||
|
||||
return new Rect(min.x, min.y, max.x - min.x, max.y - min.y);
|
||||
}
|
||||
|
||||
internal void DeactivateInputField()
|
||||
{
|
||||
if (!instances.ContainsKey(id)) return;
|
||||
|
||||
WebGLInputPlugin.WebGLInputDelete(id);
|
||||
input.DeactivateInputField();
|
||||
instances.Remove(id);
|
||||
id = -1; // reset id to -1;
|
||||
WebGLWindow.OnBlurEvent -= OnWindowBlur;
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action<int>))]
|
||||
static void OnFocus(int id)
|
||||
{
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
Input.ResetInputAxes(); // Inputの状態リセット
|
||||
UnityEngine.WebGLInput.captureAllKeyboardInput = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action<int>))]
|
||||
static void OnBlur(int id)
|
||||
{
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
UnityEngine.WebGLInput.captureAllKeyboardInput = true;
|
||||
Input.ResetInputAxes(); // Inputの状態リセット
|
||||
#endif
|
||||
instances[id].StartCoroutine(Blur(id));
|
||||
}
|
||||
|
||||
static IEnumerator Blur(int id)
|
||||
{
|
||||
yield return null;
|
||||
if (!instances.ContainsKey(id)) yield break;
|
||||
|
||||
var block = instances[id].blurBlock; // get blur block state
|
||||
instances[id].blurBlock = false; // reset instalce block state
|
||||
if (block) yield break; // if block. break it!!
|
||||
instances[id].DeactivateInputField();
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action<int, string>))]
|
||||
static void OnValueChange(int id, string value)
|
||||
{
|
||||
if (!instances.ContainsKey(id)) return;
|
||||
|
||||
var instance = instances[id];
|
||||
if (!instance.input.ReadOnly)
|
||||
{
|
||||
instance.input.text = value;
|
||||
}
|
||||
|
||||
// InputField.ContentType.Name が Name の場合、先頭文字が強制的大文字になるため小文字にして比べる
|
||||
if (instance.input.contentType == ContentType.Name)
|
||||
{
|
||||
if (string.Compare(instance.input.text, value, true) == 0)
|
||||
{
|
||||
value = instance.input.text;
|
||||
}
|
||||
}
|
||||
|
||||
// InputField の ContentType による整形したテキストを HTML の input に再設定します
|
||||
if (value != instance.input.text)
|
||||
{
|
||||
var start = WebGLInputPlugin.WebGLInputSelectionStart(id);
|
||||
var end = WebGLInputPlugin.WebGLInputSelectionEnd(id);
|
||||
// take the offset.when char remove from input.
|
||||
var offset = instance.input.text.Length - value.Length;
|
||||
|
||||
WebGLInputPlugin.WebGLInputText(id, instance.input.text);
|
||||
// reset the input element selection range!!
|
||||
WebGLInputPlugin.WebGLInputSetSelectionRange(id, start + offset, end + offset);
|
||||
}
|
||||
}
|
||||
[MonoPInvokeCallback(typeof(Action<int, string>))]
|
||||
static void OnEditEnd(int id, string value)
|
||||
{
|
||||
if (!instances[id].input.ReadOnly)
|
||||
{
|
||||
instances[id].input.text = value;
|
||||
}
|
||||
}
|
||||
[MonoPInvokeCallback(typeof(Action<int, int>))]
|
||||
static void OnTab(int id, int value)
|
||||
{
|
||||
WebGLInputTabFocus.OnTab(instances[id], value);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (input == null || !input.isFocused)
|
||||
{
|
||||
CheckOutFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
// 未登録の場合、選択する
|
||||
if (!instances.ContainsKey(id))
|
||||
{
|
||||
if (Application.isMobilePlatform)
|
||||
{
|
||||
return;
|
||||
} else
|
||||
{
|
||||
OnSelect();
|
||||
}
|
||||
}
|
||||
else if (!WebGLInputPlugin.WebGLInputIsFocus(id))
|
||||
{
|
||||
if (Application.isMobilePlatform)
|
||||
{
|
||||
//input.DeactivateInputField();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// focus this id
|
||||
WebGLInputPlugin.WebGLInputFocus(id);
|
||||
}
|
||||
}
|
||||
|
||||
var start = WebGLInputPlugin.WebGLInputSelectionStart(id);
|
||||
var end = WebGLInputPlugin.WebGLInputSelectionEnd(id);
|
||||
// 選択方向によって設定します
|
||||
if (WebGLInputPlugin.WebGLInputSelectionDirection(id) == -1)
|
||||
{
|
||||
input.selectionFocusPosition = start;
|
||||
input.selectionAnchorPosition = end;
|
||||
}
|
||||
else
|
||||
{
|
||||
input.selectionFocusPosition = end;
|
||||
input.selectionAnchorPosition = start;
|
||||
}
|
||||
|
||||
input.Rebuild();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (!instances.ContainsKey(id)) return;
|
||||
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
UnityEngine.WebGLInput.captureAllKeyboardInput = true;
|
||||
Input.ResetInputAxes(); // Inputの状態リセット
|
||||
#endif
|
||||
DeactivateInputField();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
WebGLInputTabFocus.Add(this);
|
||||
}
|
||||
private void OnDisable()
|
||||
{
|
||||
WebGLInputTabFocus.Remove(this);
|
||||
}
|
||||
public int CompareTo(WebGLInput other)
|
||||
{
|
||||
var a = GetScreenCoordinates(input.RectTransform());
|
||||
var b = GetScreenCoordinates(other.input.RectTransform());
|
||||
var res = b.y.CompareTo(a.y);
|
||||
if (res == 0) res = a.x.CompareTo(b.x);
|
||||
return res;
|
||||
}
|
||||
|
||||
public void CheckOutFocus()
|
||||
{
|
||||
if (!Application.isMobilePlatform) return;
|
||||
if (!instances.ContainsKey(id)) return;
|
||||
var current = EventSystem.current.currentSelectedGameObject;
|
||||
if (current != null) return;
|
||||
WebGLInputPlugin.WebGLInputForceBlur(id); // Input ではないし、キーボードを閉じる
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// to manage tab focus
|
||||
/// base on scene position
|
||||
/// </summary>
|
||||
static class WebGLInputTabFocus
|
||||
{
|
||||
static List<WebGLInput> inputs = new List<WebGLInput>();
|
||||
|
||||
public static void Add(WebGLInput input)
|
||||
{
|
||||
inputs.Add(input);
|
||||
inputs.Sort();
|
||||
}
|
||||
|
||||
public static void Remove(WebGLInput input)
|
||||
{
|
||||
inputs.Remove(input);
|
||||
}
|
||||
|
||||
public static void OnTab(WebGLInput input, int value)
|
||||
{
|
||||
if (inputs.Count <= 1) return;
|
||||
var index = inputs.IndexOf(input);
|
||||
index += value;
|
||||
if (index < 0) index = inputs.Count - 1;
|
||||
else if (index >= inputs.Count) index = 0;
|
||||
inputs[index].input.ActivateInputField();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cc33a39070010f94fb1c2dd721c1286d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,184 @@
|
|||
var WebGLInput = {
|
||||
$instances: [],
|
||||
WebGLInputInit : function() {
|
||||
// Remove the `Runtime` object from "v1.37.27: 12/24/2017"
|
||||
// if Runtime not defined. create and add functon!!
|
||||
if(typeof Runtime === "undefined") Runtime = { dynCall : dynCall }
|
||||
},
|
||||
WebGLInputCreate: function (canvasId, x, y, width, height, fontsize, text, placeholder, isMultiLine, isPassword, isHidden, isMobile) {
|
||||
|
||||
var container = document.getElementById(UTF8ToString(canvasId));
|
||||
var canvas = container.getElementsByTagName('canvas')[0];
|
||||
|
||||
// if container is null and have canvas
|
||||
if (!container && canvas)
|
||||
{
|
||||
// set the container to canvas.parentNode
|
||||
container = canvas.parentNode;
|
||||
}
|
||||
|
||||
if(canvas)
|
||||
{
|
||||
var scaleX = container.offsetWidth / canvas.width;
|
||||
var scaleY = container.offsetHeight / canvas.height;
|
||||
|
||||
if(scaleX && scaleY)
|
||||
{
|
||||
x *= scaleX;
|
||||
width *= scaleX;
|
||||
y *= scaleY;
|
||||
height *= scaleY;
|
||||
}
|
||||
}
|
||||
|
||||
var input = document.createElement(isMultiLine?"textarea":"input");
|
||||
input.style.position = "absolute";
|
||||
|
||||
if(isMobile) {
|
||||
input.style.bottom = 1 + "vh";
|
||||
input.style.left = 5 + "vw";
|
||||
input.style.width = 90 + "vw";
|
||||
input.style.height = (isMultiLine? 18 : 10) + "vh";
|
||||
input.style.fontSize = 5 + "vh";
|
||||
input.style.borderWidth = 5 + "px";
|
||||
input.style.borderColor = "#000000";
|
||||
} else {
|
||||
input.style.top = y + "px";
|
||||
input.style.left = x + "px";
|
||||
input.style.width = width + "px";
|
||||
input.style.height = height + "px";
|
||||
input.style.fontSize = fontsize + "px";
|
||||
}
|
||||
|
||||
input.style.outlineWidth = 1 + 'px';
|
||||
input.style.opacity = isHidden?0:1;
|
||||
input.style.resize = 'none'; // for textarea
|
||||
input.style.padding = '0px 1px';
|
||||
input.style.cursor = "default";
|
||||
input.style.touchAction = 'manipulation'; // for mobile
|
||||
|
||||
input.spellcheck = false;
|
||||
input.value = UTF8ToString(text);
|
||||
input.placeholder = UTF8ToString(placeholder);
|
||||
|
||||
if(isPassword){
|
||||
input.type = 'password';
|
||||
}
|
||||
|
||||
if(isMobile) {
|
||||
document.body.appendChild(input);
|
||||
} else {
|
||||
container.appendChild(input);
|
||||
}
|
||||
return instances.push(input) - 1;
|
||||
},
|
||||
WebGLInputEnterSubmit: function(id, falg){
|
||||
var input = instances[id];
|
||||
// for enter key
|
||||
input.addEventListener('keydown', function(e) {
|
||||
if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
|
||||
if(falg)
|
||||
{
|
||||
e.preventDefault();
|
||||
input.blur();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
WebGLInputTab:function(id, cb) {
|
||||
var input = instances[id];
|
||||
// for tab key
|
||||
input.addEventListener('keydown', function (e) {
|
||||
if ((e.which && e.which === 9) || (e.keyCode && e.keyCode === 9)) {
|
||||
e.preventDefault();
|
||||
|
||||
// if enable tab text
|
||||
if(input.enableTabText){
|
||||
var val = input.value;
|
||||
var start = input.selectionStart;
|
||||
var end = input.selectionEnd;
|
||||
input.value = val.substr(0, start) + '\t' + val.substr(end, val.length);
|
||||
input.setSelectionRange(start + 1, start + 1);
|
||||
input.oninput(); // call oninput to exe ValueChange function!!
|
||||
} else {
|
||||
Runtime.dynCall("vii", cb, [id, e.shiftKey ? -1 : 1]);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
WebGLInputFocus: function(id){
|
||||
var input = instances[id];
|
||||
input.focus();
|
||||
},
|
||||
WebGLInputOnFocus: function (id, cb) {
|
||||
var input = instances[id];
|
||||
input.onfocus = function () {
|
||||
Runtime.dynCall("vi", cb, [id]);
|
||||
};
|
||||
},
|
||||
WebGLInputOnBlur: function (id, cb) {
|
||||
var input = instances[id];
|
||||
input.onblur = function () {
|
||||
Runtime.dynCall("vi", cb, [id]);
|
||||
};
|
||||
},
|
||||
WebGLInputIsFocus: function (id) {
|
||||
return instances[id] === document.activeElement;
|
||||
},
|
||||
WebGLInputOnValueChange:function(id, cb){
|
||||
var input = instances[id];
|
||||
input.oninput = function () {
|
||||
var intArray = intArrayFromString(input.value);
|
||||
var value = (allocate.length <= 2) ? allocate(intArray, ALLOC_NORMAL):allocate(intArray, 'i8', ALLOC_NORMAL);
|
||||
Runtime.dynCall("vii", cb, [id,value]);
|
||||
};
|
||||
},
|
||||
WebGLInputOnEditEnd:function(id, cb){
|
||||
var input = instances[id];
|
||||
input.onchange = function () {
|
||||
var intArray = intArrayFromString(input.value);
|
||||
var value = (allocate.length <= 2) ? allocate(intArray, ALLOC_NORMAL):allocate(intArray, 'i8', ALLOC_NORMAL);
|
||||
Runtime.dynCall("vii", cb, [id,value]);
|
||||
};
|
||||
},
|
||||
WebGLInputSelectionStart:function(id){
|
||||
var input = instances[id];
|
||||
return input.selectionStart;
|
||||
},
|
||||
WebGLInputSelectionEnd:function(id){
|
||||
var input = instances[id];
|
||||
return input.selectionEnd;
|
||||
},
|
||||
WebGLInputSelectionDirection:function(id){
|
||||
var input = instances[id];
|
||||
return (input.selectionDirection == "backward")?-1:1;
|
||||
},
|
||||
WebGLInputSetSelectionRange:function(id, start, end){
|
||||
var input = instances[id];
|
||||
input.setSelectionRange(start, end);
|
||||
},
|
||||
WebGLInputMaxLength:function(id, maxlength){
|
||||
var input = instances[id];
|
||||
input.maxLength = maxlength;
|
||||
},
|
||||
WebGLInputText:function(id, text){
|
||||
var input = instances[id];
|
||||
input.value = UTF8ToString(text);
|
||||
},
|
||||
WebGLInputDelete:function(id){
|
||||
var input = instances[id];
|
||||
input.parentNode.removeChild(input);
|
||||
instances[id] = null;
|
||||
},
|
||||
WebGLInputEnableTabText:function(id, enable) {
|
||||
var input = instances[id];
|
||||
input.enableTabText = enable;
|
||||
},
|
||||
WebGLInputForceBlur:function(id) {
|
||||
var input = instances[id];
|
||||
input.blur();
|
||||
},
|
||||
}
|
||||
|
||||
autoAddDeps(WebGLInput, '$instances');
|
||||
mergeInto(LibraryManager.library, WebGLInput);
|
|
@ -0,0 +1,34 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7df541bf7b903fb45b24fab892876393
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Facebook: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dfaa1fbdc36ec0d45b321b02a2089b55
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,45 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace WebGLSupport
|
||||
{
|
||||
public enum ContentType
|
||||
{
|
||||
Standard = 0,
|
||||
Autocorrected = 1,
|
||||
IntegerNumber = 2,
|
||||
DecimalNumber = 3,
|
||||
Alphanumeric = 4,
|
||||
Name = 5,
|
||||
EmailAddress = 6,
|
||||
Password = 7,
|
||||
Pin = 8,
|
||||
Custom = 9
|
||||
}
|
||||
public enum LineType
|
||||
{
|
||||
SingleLine = 0,
|
||||
MultiLineSubmit = 1,
|
||||
MultiLineNewline = 2
|
||||
}
|
||||
public interface IInputField
|
||||
{
|
||||
ContentType contentType { get; }
|
||||
LineType lineType { get; }
|
||||
int fontSize { get; }
|
||||
string text { get; set; }
|
||||
string placeholder { get; }
|
||||
int characterLimit { get; }
|
||||
int caretPosition { get; }
|
||||
bool isFocused { get; }
|
||||
int selectionFocusPosition { get; set; }
|
||||
int selectionAnchorPosition { get; set; }
|
||||
bool ReadOnly { get; }
|
||||
bool OnFocusSelectAll { get; }
|
||||
|
||||
RectTransform RectTransform();
|
||||
void ActivateInputField();
|
||||
void DeactivateInputField();
|
||||
void Rebuild();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8be52c4f26f76e04fbae3cb86e539bdb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,110 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using WebGLSupport.Detail;
|
||||
|
||||
namespace WebGLSupport
|
||||
{
|
||||
/// <summary>
|
||||
/// Wrapper for UnityEngine.UI.InputField
|
||||
/// </summary>
|
||||
class WrappedInputField : IInputField
|
||||
{
|
||||
InputField input;
|
||||
RebuildChecker checker;
|
||||
|
||||
public bool ReadOnly { get { return input.readOnly; } }
|
||||
|
||||
public string text
|
||||
{
|
||||
get { return input.text; }
|
||||
set { input.text = value; }
|
||||
}
|
||||
|
||||
public string placeholder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!input.placeholder) return "";
|
||||
var text = input.placeholder.GetComponent<Text>();
|
||||
return text ? text.text : "";
|
||||
}
|
||||
}
|
||||
|
||||
public int fontSize
|
||||
{
|
||||
get { return input.textComponent.fontSize; }
|
||||
}
|
||||
|
||||
public ContentType contentType
|
||||
{
|
||||
get { return (ContentType)input.contentType; }
|
||||
}
|
||||
|
||||
public LineType lineType
|
||||
{
|
||||
get { return (LineType)input.lineType; }
|
||||
}
|
||||
|
||||
public int characterLimit
|
||||
{
|
||||
get { return input.characterLimit; }
|
||||
}
|
||||
|
||||
public int caretPosition
|
||||
{
|
||||
get { return input.caretPosition; }
|
||||
}
|
||||
|
||||
public bool isFocused
|
||||
{
|
||||
get { return input.isFocused; }
|
||||
}
|
||||
|
||||
public int selectionFocusPosition
|
||||
{
|
||||
get { return input.selectionFocusPosition; }
|
||||
set { input.selectionFocusPosition = value; }
|
||||
}
|
||||
|
||||
public int selectionAnchorPosition
|
||||
{
|
||||
get { return input.selectionAnchorPosition; }
|
||||
set { input.selectionAnchorPosition = value; }
|
||||
}
|
||||
|
||||
public bool OnFocusSelectAll
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public WrappedInputField(InputField input)
|
||||
{
|
||||
this.input = input;
|
||||
checker = new RebuildChecker(this);
|
||||
}
|
||||
|
||||
public RectTransform RectTransform()
|
||||
{
|
||||
return input.GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
public void ActivateInputField()
|
||||
{
|
||||
input.ActivateInputField();
|
||||
}
|
||||
|
||||
public void DeactivateInputField()
|
||||
{
|
||||
input.DeactivateInputField();
|
||||
}
|
||||
|
||||
public void Rebuild()
|
||||
{
|
||||
if (checker.NeedRebuild())
|
||||
{
|
||||
input.textComponent.SetAllDirty();
|
||||
input.Rebuild(CanvasUpdate.LatePreRender);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0c8464791034e144ca224c37c1816e37
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,193 @@
|
|||
#if UNITY_2018_2_OR_NEWER
|
||||
#define TMP_WEBGL_SUPPORT
|
||||
#endif
|
||||
|
||||
#if TMP_WEBGL_SUPPORT
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using WebGLSupport.Detail;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
|
||||
namespace WebGLSupport
|
||||
{
|
||||
/// <summary>
|
||||
/// Wrapper for TMPro.TMP_InputField
|
||||
/// </summary>
|
||||
class WrappedTMPInputField : IInputField
|
||||
{
|
||||
TMP_InputField input;
|
||||
RebuildChecker checker;
|
||||
Coroutine delayedGraphicRebuild;
|
||||
|
||||
public bool ReadOnly { get { return input.readOnly; } }
|
||||
|
||||
public string text
|
||||
{
|
||||
get { return input.text; }
|
||||
set { input.text = FixContentTypeByInputField(value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// workaround!!
|
||||
/// when use TMP_InputField.text = "xxx"; is will set the text directly.
|
||||
/// so, use InputField for match the ContentType!
|
||||
/// </summary>
|
||||
/// <param name="inText"></param>
|
||||
/// <returns></returns>
|
||||
private string FixContentTypeByInputField(string inText)
|
||||
{
|
||||
var go = new GameObject("FixContentTypeByInputField for WebGLInput");
|
||||
go.SetActive(false);
|
||||
var i = go.AddComponent<InputField>();
|
||||
i.contentType = (InputField.ContentType)Enum.Parse(typeof(InputField.ContentType), input.contentType.ToString());
|
||||
i.lineType = (InputField.LineType)Enum.Parse(typeof(InputField.LineType), input.lineType.ToString());
|
||||
i.inputType = (InputField.InputType)Enum.Parse(typeof(InputField.InputType), input.inputType.ToString());
|
||||
i.keyboardType = input.keyboardType;
|
||||
i.characterValidation = (InputField.CharacterValidation)Enum.Parse(typeof(InputField.CharacterValidation), input.characterValidation.ToString());
|
||||
i.characterLimit = input.characterLimit;
|
||||
i.text = inText;
|
||||
var res = i.text;
|
||||
GameObject.Destroy(go);
|
||||
return res;
|
||||
}
|
||||
|
||||
public string placeholder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!input.placeholder) return "";
|
||||
var text = input.placeholder.GetComponent<TMP_Text>();
|
||||
return text ? text.text : "";
|
||||
}
|
||||
}
|
||||
|
||||
public int fontSize
|
||||
{
|
||||
get { return (int)input.textComponent.fontSize; }
|
||||
}
|
||||
|
||||
public ContentType contentType
|
||||
{
|
||||
get { return (ContentType)input.contentType; }
|
||||
}
|
||||
|
||||
public LineType lineType
|
||||
{
|
||||
get { return (LineType)input.lineType; }
|
||||
}
|
||||
|
||||
public int characterLimit
|
||||
{
|
||||
get { return input.characterLimit; }
|
||||
}
|
||||
|
||||
public int caretPosition
|
||||
{
|
||||
get { return input.caretPosition; }
|
||||
}
|
||||
|
||||
public bool isFocused
|
||||
{
|
||||
get { return input.isFocused; }
|
||||
}
|
||||
|
||||
public int selectionFocusPosition
|
||||
{
|
||||
get { return input.selectionStringFocusPosition; }
|
||||
set { input.selectionStringFocusPosition = value; }
|
||||
}
|
||||
|
||||
public int selectionAnchorPosition
|
||||
{
|
||||
get { return input.selectionStringAnchorPosition; }
|
||||
set { input.selectionStringAnchorPosition = value; }
|
||||
}
|
||||
|
||||
public bool OnFocusSelectAll
|
||||
{
|
||||
get { return input.onFocusSelectAll; }
|
||||
}
|
||||
|
||||
public WrappedTMPInputField(TMP_InputField input)
|
||||
{
|
||||
this.input = input;
|
||||
checker = new RebuildChecker(this);
|
||||
}
|
||||
|
||||
public RectTransform RectTransform()
|
||||
{
|
||||
// 表示範囲
|
||||
// MEMO :
|
||||
// TMP では textComponent を移動させてクリッピングするため、
|
||||
// 表示範囲外になる場合があるので、自分の範囲を返す
|
||||
return input.GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
public void ActivateInputField()
|
||||
{
|
||||
input.ActivateInputField();
|
||||
}
|
||||
|
||||
public void DeactivateInputField()
|
||||
{
|
||||
input.DeactivateInputField();
|
||||
}
|
||||
|
||||
public void Rebuild()
|
||||
{
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
if (checker.NeedRebuild())
|
||||
{
|
||||
input.textComponent.SetVerticesDirty();
|
||||
input.textComponent.SetLayoutDirty();
|
||||
input.Rebuild(CanvasUpdate.LatePreRender);
|
||||
}
|
||||
#else
|
||||
if (input.textComponent.enabled && checker.NeedRebuild())
|
||||
{
|
||||
//================================
|
||||
// fix bug for tmp
|
||||
// TMPの不具合で、正しく座標を設定されてなかったため、試しに対応する
|
||||
var rt = input.textComponent.GetComponent<RectTransform>();
|
||||
var size = input.textComponent.GetPreferredValues();
|
||||
if (size.x < rt.rect.xMax)
|
||||
{
|
||||
// textComponent の座標を更新
|
||||
var pos = rt.anchoredPosition;
|
||||
pos.x = 0;
|
||||
rt.anchoredPosition = pos;
|
||||
|
||||
// caret の座標更新
|
||||
var caret = input.GetComponentInChildren<TMP_SelectionCaret>();
|
||||
var caretRect = caret.GetComponent<RectTransform>();
|
||||
caretRect.anchoredPosition = rt.anchoredPosition;
|
||||
}
|
||||
//==============================
|
||||
|
||||
// HACK : 1フレーム無効にする
|
||||
// MEMO : 他にいい方法Rebuildがあれば対応する
|
||||
// LayoutRebuilder.ForceRebuildLayoutImmediate(); で試してダメでした
|
||||
input.textComponent.enabled = rectOverlaps(input.textComponent.rectTransform, input.textViewport);
|
||||
input.textComponent.SetAllDirty();
|
||||
input.Rebuild(CanvasUpdate.LatePreRender);
|
||||
//Debug.Log(input.textComponent.enabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
input.textComponent.enabled = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool rectOverlaps(RectTransform rectTrans1, RectTransform rectTrans2)
|
||||
{
|
||||
Rect rect1 = new Rect(rectTrans1.localPosition.x, rectTrans1.localPosition.y, rectTrans1.rect.width, rectTrans1.rect.height);
|
||||
Rect rect2 = new Rect(rectTrans2.localPosition.x, rectTrans2.localPosition.y, rectTrans2.rect.width, rectTrans2.rect.height);
|
||||
|
||||
return rect1.Overlaps(rect2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // TMP_WEBGL_SUPPORT
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e1629c3a135d89a45aca880fa8052f5d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ef582d6b11c3602438e4a301923e45dc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,92 @@
|
|||
using System;
|
||||
using AOT;
|
||||
using System.Runtime.InteropServices; // for DllImport
|
||||
using UnityEngine;
|
||||
|
||||
namespace WebGLSupport
|
||||
{
|
||||
static class WebGLWindowPlugin
|
||||
{
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLWindowInit();
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLWindowOnFocus(Action cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLWindowOnBlur(Action cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLWindowOnResize(Action cb);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGLWindowInjectFullscreen();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern string WebGLWindowGetCanvasName();
|
||||
#else
|
||||
public static void WebGLWindowInit() { }
|
||||
public static void WebGLWindowOnFocus(Action cb) { }
|
||||
public static void WebGLWindowOnBlur(Action cb) { }
|
||||
public static void WebGLWindowOnResize(Action cb) { }
|
||||
public static void WebGLWindowInjectFullscreen() { }
|
||||
public static string WebGLWindowGetCanvasName() { return ""; }
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
public static class WebGLWindow
|
||||
{
|
||||
static WebGLWindow()
|
||||
{
|
||||
WebGLWindowPlugin.WebGLWindowInit();
|
||||
}
|
||||
public static bool Focus { get; private set; }
|
||||
public static event Action OnFocusEvent = () => { };
|
||||
public static event Action OnBlurEvent = () => { };
|
||||
public static event Action OnResizeEvent = () => { };
|
||||
|
||||
static string ViewportContent;
|
||||
static void Init()
|
||||
{
|
||||
Focus = true;
|
||||
WebGLWindowPlugin.WebGLWindowOnFocus(OnWindowFocus);
|
||||
WebGLWindowPlugin.WebGLWindowOnBlur(OnWindowBlur);
|
||||
WebGLWindowPlugin.WebGLWindowOnResize(OnWindowResize);
|
||||
WebGLWindowPlugin.WebGLWindowInjectFullscreen();
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action))]
|
||||
static void OnWindowFocus()
|
||||
{
|
||||
Focus = true;
|
||||
OnFocusEvent();
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action))]
|
||||
static void OnWindowBlur()
|
||||
{
|
||||
Focus = false;
|
||||
OnBlurEvent();
|
||||
}
|
||||
|
||||
[MonoPInvokeCallback(typeof(Action))]
|
||||
static void OnWindowResize()
|
||||
{
|
||||
OnResizeEvent();
|
||||
}
|
||||
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
static void RuntimeInitializeOnLoadMethod()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
public static string GetCanvasName()
|
||||
{
|
||||
return WebGLWindowPlugin.WebGLWindowGetCanvasName();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5fcbb4f34ed8e894896251ff74a4633d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,103 @@
|
|||
var WebGLWindow = {
|
||||
WebGLWindowInit : function() {
|
||||
// Remove the `Runtime` object from "v1.37.27: 12/24/2017"
|
||||
// if Runtime not defined. create and add functon!!
|
||||
if(typeof Runtime === "undefined") Runtime = { dynCall : dynCall }
|
||||
},
|
||||
WebGLWindowGetCanvasName: function() {
|
||||
var elements = document.getElementsByTagName('canvas');
|
||||
var res = (elements.length <= 0) ? "" : elements[0].parentNode.id;
|
||||
var intArray = intArrayFromString(res);
|
||||
return (allocate.length <= 2) ? allocate(intArray, ALLOC_NORMAL):allocate(intArray, 'i8', ALLOC_NORMAL);
|
||||
},
|
||||
WebGLWindowOnFocus: function (cb) {
|
||||
window.addEventListener('focus', function () {
|
||||
Runtime.dynCall("v", cb, []);
|
||||
});
|
||||
},
|
||||
WebGLWindowOnBlur: function (cb) {
|
||||
window.addEventListener('blur', function () {
|
||||
Runtime.dynCall("v", cb, []);
|
||||
});
|
||||
},
|
||||
WebGLWindowOnResize: function(cb) {
|
||||
window.addEventListener('resize', function () {
|
||||
Runtime.dynCall("v", cb, []);
|
||||
});
|
||||
},
|
||||
WebGLWindowInjectFullscreen : function () {
|
||||
document.makeFullscreen = function (id, keepAspectRatio) {
|
||||
// get fullscreen object
|
||||
var getFullScreenObject = function () {
|
||||
var doc = window.document;
|
||||
var objFullScreen = doc.fullscreenElement || doc.mozFullScreenElement || doc.webkitFullscreenElement || doc.msFullscreenElement;
|
||||
return (objFullScreen);
|
||||
}
|
||||
|
||||
// handle fullscreen event
|
||||
var eventFullScreen = function (callback) {
|
||||
document.addEventListener("fullscreenchange", callback, false);
|
||||
document.addEventListener("webkitfullscreenchange", callback, false);
|
||||
document.addEventListener("mozfullscreenchange", callback, false);
|
||||
document.addEventListener("MSFullscreenChange", callback, false);
|
||||
}
|
||||
|
||||
var removeEventFullScreen = function (callback) {
|
||||
document.removeEventListener("fullscreenchange", callback, false);
|
||||
document.removeEventListener("webkitfullscreenchange", callback, false);
|
||||
document.removeEventListener("mozfullscreenchange", callback, false);
|
||||
document.removeEventListener("MSFullscreenChange", callback, false);
|
||||
}
|
||||
|
||||
var div = document.createElement("div");
|
||||
document.body.appendChild(div);
|
||||
|
||||
var canvas = document.getElementById(id);
|
||||
var beforeParent = canvas.parentNode;
|
||||
var beforeStyle = window.getComputedStyle(canvas);
|
||||
var beforeWidth = parseInt(beforeStyle.width);
|
||||
var beforeHeight = parseInt(beforeStyle.height);
|
||||
|
||||
// to keep element index after fullscreen
|
||||
var index = Array.from(beforeParent.children).findIndex(function (v) { return v == canvas; });
|
||||
div.appendChild(canvas);
|
||||
|
||||
// recv fullscreen function
|
||||
var fullscreenFunc = function () {
|
||||
if (getFullScreenObject()) {
|
||||
if (keepAspectRatio) {
|
||||
var ratio = Math.min(window.screen.width / beforeWidth, window.screen.height / beforeHeight);
|
||||
var width = Math.floor(beforeWidth * ratio);
|
||||
var height = Math.floor(beforeHeight * ratio);
|
||||
|
||||
canvas.style.width = width + 'px';
|
||||
canvas.style.height = height + 'px';;
|
||||
} else {
|
||||
canvas.style.width = window.screen.width + 'px';;
|
||||
canvas.style.height = window.screen.height + 'px';;
|
||||
}
|
||||
|
||||
} else {
|
||||
canvas.style.width = beforeWidth + 'px';;
|
||||
canvas.style.height = beforeHeight + 'px';;
|
||||
beforeParent.insertBefore(canvas, Array.from(beforeParent.children)[index]);
|
||||
|
||||
div.parentNode.removeChild(div);
|
||||
|
||||
// remove this function
|
||||
removeEventFullScreen(fullscreenFunc);
|
||||
}
|
||||
}
|
||||
|
||||
// listener fullscreen event
|
||||
eventFullScreen(fullscreenFunc);
|
||||
|
||||
if (div.mozRequestFullScreen) div.mozRequestFullScreen();
|
||||
else if (div.webkitRequestFullScreen) div.webkitRequestFullScreen();
|
||||
else if (div.msRequestFullscreen) div.msRequestFullscreen();
|
||||
else if (div.requestFullscreen) div.requestFullscreen();
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
mergeInto(LibraryManager.library, WebGLWindow);
|
|
@ -0,0 +1,34 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5edef37b75c044e41a013a62fec2e1ff
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Facebook: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because one or more lines are too long
|
@ -2,4 +2,5 @@
|
|||
<packages>
|
||||
<package id="AutoMapper" version="12.0.1" />
|
||||
<package id="SimpleJson" version="0.38.0" />
|
||||
<package id="System.Security.Cryptography.ProtectedData" version="4.5.0" />
|
||||
</packages>
|
|
@ -272,6 +272,13 @@ public class GameManager : MonoBehaviour
|
|||
isFind = true;
|
||||
break;
|
||||
}
|
||||
//水浸
|
||||
else if (ENVs[i].pointType == "4")
|
||||
{
|
||||
item.GetComponent<ENVQuery>().eNVList_J = ENVs[i];
|
||||
isFind = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isFind) continue;
|
||||
|
@ -296,6 +303,12 @@ public class GameManager : MonoBehaviour
|
|||
machine_room.GetComponent<ENVQuery>().eNVList_Y = ENVs[i];
|
||||
isFind = true;
|
||||
}
|
||||
//水浸
|
||||
else if (ENVs[i].pointType == "4")
|
||||
{
|
||||
machine_room.GetComponent<ENVQuery>().eNVList_J = ENVs[i];
|
||||
isFind = true;
|
||||
}
|
||||
}
|
||||
if (isFind) continue;
|
||||
var accumulator_room = GameObject.Find("蓄电池室");
|
||||
|
@ -319,6 +332,12 @@ public class GameManager : MonoBehaviour
|
|||
accumulator_room.GetComponent<ENVQuery>().eNVList_Y = ENVs[i];
|
||||
isFind = true;
|
||||
}
|
||||
//水浸
|
||||
else if (ENVs[i].pointType == "4")
|
||||
{
|
||||
accumulator_room.GetComponent<ENVQuery>().eNVList_J = ENVs[i];
|
||||
isFind = true;
|
||||
}
|
||||
}
|
||||
if (isFind) continue;
|
||||
}
|
||||
|
@ -626,7 +645,7 @@ public class GameManager : MonoBehaviour
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("模型生成错误:" + item.name + "\n" + e.Message + "\n" + e.StackTrace);
|
||||
Debug.LogWarning("模型生成错误:" + item.name + "\n" + e.Message + "\n" + e.StackTrace);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -787,7 +806,7 @@ public class GameManager : MonoBehaviour
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("序列化-设备查询错误:" + e.Message);
|
||||
Debug.LogWarning("序列化-设备查询错误:" + e.Message);
|
||||
}
|
||||
})
|
||||
); ;
|
||||
|
@ -832,7 +851,7 @@ public class GameManager : MonoBehaviour
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("序列化-端口查询错误:" + e.Message);
|
||||
Debug.LogWarning("序列化-端口查询错误:" + e.Message);
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -843,7 +862,7 @@ public class GameManager : MonoBehaviour
|
|||
/// 查询所有环境
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerator init_ENV()
|
||||
public IEnumerator init_ENV(Action<string> callback)
|
||||
{
|
||||
|
||||
ENVs.Clear();
|
||||
|
@ -872,10 +891,11 @@ public class GameManager : MonoBehaviour
|
|||
ENVs.Clear();
|
||||
|
||||
Debug.Log("环境查询完成" /*+ "URL:" + Jk_URL.hj_cx + "Token:" + arguments.token + "返回内容" + jsonResult2*/);
|
||||
callback?.Invoke("1");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("序列化-环境查询错误:" + e.Message);
|
||||
Debug.LogWarning("序列化-环境查询错误:" + e.Message);
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -886,7 +906,7 @@ public class GameManager : MonoBehaviour
|
|||
/// 查询所有告警
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerator init_TmsAlarm(Action<string> callback = null)
|
||||
public IEnumerator init_TmsAlarm(Action<string> callback)
|
||||
{
|
||||
Array.ForEach(GameObject.FindObjectsOfType<TmsAlarmQuery>(), itme =>
|
||||
{
|
||||
|
@ -928,7 +948,7 @@ public class GameManager : MonoBehaviour
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("序列化-告警查询错误:" + e.Message);
|
||||
Debug.LogWarning("序列化-告警查询错误:" + e.Message);
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -1208,6 +1228,8 @@ public class GameManager : MonoBehaviour
|
|||
for (int i = 0; i < Cabinets_go.Count; i++)
|
||||
{
|
||||
var D = Cabinets_go[i].GetComponent<DeviceQuery>().deviceList;
|
||||
if (D.rackType == "2")
|
||||
continue;
|
||||
//var H = Cabinets_go[i].GetComponent<HighlightEffect>();
|
||||
try
|
||||
{
|
||||
|
@ -1747,7 +1769,7 @@ public class GameManager : MonoBehaviour
|
|||
//Debug.Log("@@10");
|
||||
isLoading = false;
|
||||
//Debug.Log("@@11");
|
||||
TransparentGlowManage.Inst.addScript();
|
||||
//TransparentGlowManage.Inst.addScript();
|
||||
//Debug.Log("@@12");
|
||||
yield return StartCoroutine(init_Device());
|
||||
//Debug.Log("@@13");//???
|
||||
|
@ -1774,9 +1796,12 @@ public class GameManager : MonoBehaviour
|
|||
Load_Port();
|
||||
//Load_TmsAlarm();
|
||||
//Load_ENV();
|
||||
TransparentGlowManage.Inst.addScript();
|
||||
LineGroupManager.Instance.addxianlan();
|
||||
Application.ExternalCall("OnSceneLoaded", "三维加载完成");
|
||||
|
||||
//三维场景加载时显示地图
|
||||
Application.ExternalCall("OnSceneLoaded", "三维加载完成");
|
||||
|
||||
isLoading = true;
|
||||
|
||||
if (CabinetUIManager.Instance.current_menu == Menu.M_数字孪生_线缆连接_配置)
|
||||
|
|
|
@ -39,8 +39,6 @@ public class WebInteraction : MonoBehaviour
|
|||
{
|
||||
//gameManager.token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2OTI2NDMyODksInVzZXJuYW1lIjoiMTgzMTIzNDU2NzgifQ.uMoC7I4SytLEgYTKHxyvOv7Lygeb9zDCmhLDYv1cJrA";
|
||||
//gameManager.enabled = true;
|
||||
Debug.Log("&&&");
|
||||
unity_ticket_cabinet("1691457954939693001,1691457954939693002,1691457954939693003,1691457954939693004,1691457954939693005,1691457954939693006,1691457954939693007,1691457954939693008,1691457954939693009,1691457954939693010,1691457954939693011,1691457954939693012");
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -83,60 +81,56 @@ public class WebInteraction : MonoBehaviour
|
|||
}
|
||||
})));
|
||||
|
||||
#region MyRegion
|
||||
//if (!gameManager.isgonging)
|
||||
//{
|
||||
// StartCoroutine(
|
||||
// CombineJSON.GetJson_POST(GameManager.Inst.Jk_URL.gj_cx, GameManager.Inst.arguments.token, 10, (jsonResult3) =>
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(jsonResult3))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// try
|
||||
// {
|
||||
// gameManager.root_AllAlarm = JsonConvert.DeserializeObject<TmsAlarmQuery.Root>(jsonResult3);
|
||||
#region 循环读取信息
|
||||
if (!gameManager.isgonging)
|
||||
{
|
||||
StartCoroutine(
|
||||
CombineJSON.GetJson_POST(GameManager.Inst.Jk_URL.gj_cx, GameManager.Inst.arguments.token, 1800, (jsonResult3) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(jsonResult3))
|
||||
{
|
||||
try
|
||||
{
|
||||
gameManager.root_AllAlarm = JsonConvert.DeserializeObject<TmsAlarmQuery.Root>(jsonResult3);
|
||||
|
||||
// Array.ForEach(GameObject.FindObjectsOfType<TmsAlarmQuery>(), itme =>
|
||||
// {
|
||||
// itme.tmsAlarmLists.Clear();
|
||||
// });
|
||||
Array.ForEach(GameObject.FindObjectsOfType<TmsAlarmQuery>(), itme =>
|
||||
{
|
||||
itme.tmsAlarmLists.Clear();
|
||||
});
|
||||
|
||||
// gameManager.tmsAlarms.Clear();
|
||||
gameManager.tmsAlarms.Clear();
|
||||
|
||||
// gameManager.Load_TmsAlarm();
|
||||
gameManager.Load_TmsAlarm();
|
||||
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// Debug.Log("序列化-告警查询错误:" + e.Message);
|
||||
// }
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("序列化-循环告警查询错误:" + e.Message);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
// }));
|
||||
StartCoroutine(
|
||||
CombineJSON.GetJson_POST(GameManager.Inst.Jk_URL.hj_cx, GameManager.Inst.arguments.token, 1800, (jsonResult2) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(jsonResult2))
|
||||
{
|
||||
try
|
||||
{
|
||||
gameManager.root_AllENV = JsonConvert.DeserializeObject<ENVQuery.Root>(jsonResult2);
|
||||
|
||||
// StartCoroutine(
|
||||
// CombineJSON.GetJson_POST(GameManager.Inst.Jk_URL.hj_cx, GameManager.Inst.arguments.token, 10, (jsonResult2) =>
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(jsonResult2))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// try
|
||||
// {
|
||||
// gameManager.root_AllENV = JsonConvert.DeserializeObject<ENVQuery.Root>(jsonResult2);
|
||||
gameManager.ENVs.Clear();
|
||||
|
||||
// gameManager.ENVs.Clear();
|
||||
gameManager.Load_ENV();
|
||||
|
||||
// gameManager.Load_ENV();
|
||||
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// Debug.Log("序列化-环境查询错误:" + e.Message);
|
||||
// }
|
||||
|
||||
// }));
|
||||
//}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("序列化-循环环境查询错误:" + e.Message);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
gameManager.isgonging = true;
|
||||
|
@ -205,7 +199,6 @@ public class WebInteraction : MonoBehaviour
|
|||
// 在此处处理打开现场作业的逻辑
|
||||
Debug.Log("Opening ticket");
|
||||
Application.ExternalCall("web_ticket_open", "");
|
||||
unity_ticket_cabinet("1691457954939693001,1691457954939693002");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -217,15 +210,19 @@ public class WebInteraction : MonoBehaviour
|
|||
Debug.Log("Closing ticket");
|
||||
Application.ExternalCall("web_ticket_close", "");
|
||||
|
||||
foreach (var item in GameManager.Inst.Cabinets_go)
|
||||
//foreach (var item in GameManager.Inst.Cabinets_go)
|
||||
//{
|
||||
// item.transform.Find("高亮").gameObject.SetActive(false);
|
||||
//}
|
||||
for (int i = 0; i < CabinetUIManager.Instance.cabine_hights.Count; i++)
|
||||
{
|
||||
item.transform.Find("高亮").gameObject.SetActive(false);
|
||||
CabinetUIManager.Instance.cabine_hights[i].SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
[ContextMenu("工作票设备关联的函数")]
|
||||
/// <summary>
|
||||
/// 工作票设备关联的函数
|
||||
/// 工作票设备关联机柜变色
|
||||
/// </summary>
|
||||
/// <param name="deviceNumbers"></param>
|
||||
public void unity_ticket_cabinet(string deviceNumbers)
|
||||
|
@ -251,9 +248,26 @@ public class WebInteraction : MonoBehaviour
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工作票设备关联机柜镜头聚焦
|
||||
/// </summary>
|
||||
/// <param name="deviceNumbers"></param>
|
||||
public void unity_ticket_locate_cabinet(string deviceNumbers)
|
||||
{
|
||||
List<GameObject> ls = new List<GameObject>();
|
||||
ls.AddRange(GameManager.Inst.Cabinets_go);
|
||||
for (int i = 0; i < ls.Count; i++)
|
||||
{
|
||||
if (ls[i].GetComponent<DeviceQuery>().deviceList.id == deviceNumbers)
|
||||
{
|
||||
ls[i].GetComponent<ClickEvent>().Change_hide(ls[i], true, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void changC(GameObject hight, string index)
|
||||
{
|
||||
|
|
|
@ -24,22 +24,25 @@ public class AlarmUI : MonoBehaviour, IPointerClickHandler
|
|||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
GameObject go;
|
||||
if (canvas.transform.childCount == 0)
|
||||
if (canvas.transform.childCount != 0)
|
||||
{
|
||||
go = Instantiate(expand_image.gameObject);
|
||||
go.transform.SetParent(canvas.transform);
|
||||
go.transform.rotation = Quaternion.identity;
|
||||
close_bt = canvas.transform.GetChild(0).Find("¹Ø±Õ").GetComponent<Button>();
|
||||
close_bt.onClick.RemoveAllListeners();
|
||||
close_bt.onClick.AddListener(() =>
|
||||
{
|
||||
canvas.transform.GetChild(0).gameObject.SetActive(false);
|
||||
});
|
||||
DestroyImmediate(canvas.transform.GetChild(0).gameObject);
|
||||
}
|
||||
else
|
||||
//else
|
||||
//{
|
||||
// go = canvas.transform.GetChild(0).gameObject;
|
||||
|
||||
//}
|
||||
|
||||
go = Instantiate(expand_image.gameObject);
|
||||
go.transform.SetParent(canvas.transform);
|
||||
go.transform.rotation = Quaternion.identity;
|
||||
close_bt = canvas.transform.GetChild(0).Find("关闭").GetComponent<Button>();
|
||||
close_bt.onClick.RemoveAllListeners();
|
||||
close_bt.onClick.AddListener(() =>
|
||||
{
|
||||
go = canvas.transform.GetChild(0).gameObject;
|
||||
}
|
||||
canvas.transform.GetChild(0).gameObject.SetActive(false);
|
||||
});
|
||||
|
||||
var worldPosition = expand_image.transform.position;
|
||||
|
||||
|
@ -97,6 +100,11 @@ public class AlarmUI : MonoBehaviour, IPointerClickHandler
|
|||
{
|
||||
if (alarmApparatus.alarmQueries == null)
|
||||
return;
|
||||
for (int i = 0; i < Content.transform.childCount; i++)
|
||||
{
|
||||
Content.transform.GetChild(i).gameObject.SetActive(false);
|
||||
}
|
||||
int num_index = 0;
|
||||
for (int i = 0; i < alarmApparatus.alarmQueries.Count; i++)
|
||||
{
|
||||
foreach (var item in alarmApparatus.alarmQueries[i].tmsAlarmLists)
|
||||
|
@ -123,9 +131,30 @@ public class AlarmUI : MonoBehaviour, IPointerClickHandler
|
|||
break;
|
||||
}
|
||||
Alarm_img.SetNativeSize();
|
||||
GameObject go = Instantiate(preform);
|
||||
go.transform.SetParent(Content.transform);
|
||||
go.SetActive(true);
|
||||
|
||||
if (Content.transform.childCount == num + 1) //原来=现在
|
||||
{
|
||||
setUI(num_index);
|
||||
}
|
||||
else if (Content.transform.childCount < num + 1)//原来<现在
|
||||
{
|
||||
if (num_index + 1 <= Content.transform.childCount - 1)
|
||||
{
|
||||
setUI(num_index);
|
||||
}
|
||||
else
|
||||
{
|
||||
addUI();
|
||||
}
|
||||
}
|
||||
else if (Content.transform.childCount > num + 1)//原来>现在
|
||||
{
|
||||
setUI(num_index);
|
||||
}
|
||||
else if (Content.transform.childCount == 1)
|
||||
{
|
||||
addUI();
|
||||
}
|
||||
|
||||
//GameObject game;
|
||||
//try
|
||||
|
@ -138,6 +167,7 @@ public class AlarmUI : MonoBehaviour, IPointerClickHandler
|
|||
//}
|
||||
//GameManager.Inst.ChangeMaterialColor(game, 0, new Color(1, 109f / 255, 0, 1));
|
||||
GameManager.Inst.ChangeMaterialColor(alarmApparatus.transform.parent.gameObject, 1);
|
||||
num_index++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,6 +179,29 @@ public class AlarmUI : MonoBehaviour, IPointerClickHandler
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置报警信息UI
|
||||
/// </summary>
|
||||
/// <param name="num_index"></param>
|
||||
public void setUI(int num_index)
|
||||
{
|
||||
Button_UI_Show b = Content.transform.GetChild(num_index + 1).GetComponent<Button_UI_Show>();
|
||||
b.Alarm_img.sprite = Alarm_img.sprite;
|
||||
b.Alarm_type.text = Alarm_type.text;
|
||||
b.Alarm_name.text = Alarm_name.text;
|
||||
b.Alarm_time.text = Alarm_time.text;
|
||||
b.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增报警信息UI
|
||||
/// </summary>
|
||||
public void addUI()
|
||||
{
|
||||
GameObject go = Instantiate(preform);
|
||||
go.transform.SetParent(Content.transform);
|
||||
go.SetActive(true);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Button_UI_Show : MonoBehaviour
|
||||
{
|
||||
public Image Alarm_img;
|
||||
public TextMeshProUGUI Alarm_type;
|
||||
public TextMeshProUGUI Alarm_name;
|
||||
public TextMeshProUGUI Alarm_time;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: da52e9a478b91ab4db59a49f49bbe5a7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -12,6 +12,7 @@ public class ENVQuery : MonoBehaviour
|
|||
public ENVList eNVList_W;//ζÈ
|
||||
public ENVList eNVList_S;//ʪ¶È
|
||||
public ENVList eNVList_Y;//Ñ̸Ð
|
||||
public ENVList eNVList_J;//Ë®½þ
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
|
|
@ -558,6 +558,28 @@ public class ClickEvent : MonoBehaviour
|
|||
/// <param name="isZoomin">是否拉近镜头</param>
|
||||
public void Change_hide(GameObject cabine, bool isHide, bool isZoomin)
|
||||
{
|
||||
if (isZoomin)
|
||||
{
|
||||
if (CabinetUIManager.Instance.cabine_hights_now.Count == 0)
|
||||
{
|
||||
for (int i = 0; i < CabinetUIManager.Instance.cabine_hights.Count; i++)
|
||||
{
|
||||
if (CabinetUIManager.Instance.cabine_hights[i].activeSelf)
|
||||
{
|
||||
CabinetUIManager.Instance.cabine_hights[i].SetActive(false);
|
||||
CabinetUIManager.Instance.cabine_hights_now.Add(CabinetUIManager.Instance.cabine_hights[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < CabinetUIManager.Instance.cabine_hights_now.Count; i++)
|
||||
{
|
||||
CabinetUIManager.Instance.cabine_hights_now[i].SetActive(true);
|
||||
}
|
||||
CabinetUIManager.Instance.cabine_hights_now.Clear();
|
||||
}
|
||||
//放大
|
||||
if (isZoomin)
|
||||
Zoomin(cabine);
|
||||
|
@ -573,9 +595,14 @@ public class ClickEvent : MonoBehaviour
|
|||
{
|
||||
string s2 = GameManager.Inst.Cabinets_go[i].GetComponent<DeviceQuery>().deviceList.devicePosition.Split('-')[0];
|
||||
if (s1 != s2)
|
||||
{
|
||||
GameManager.Inst.Cabinets_go[i].SetActive(!isHide);
|
||||
}
|
||||
else if (s1 == s2 && GameManager.Inst.Cabinets_go[i] != gameObject)
|
||||
{
|
||||
GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F1();
|
||||
GameManager.Inst.Cabinets_go[i].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
gameObject.SetActive(true);
|
||||
|
@ -601,19 +628,25 @@ public class ClickEvent : MonoBehaviour
|
|||
{
|
||||
if (cabine == GameManager.Inst.Cabinets_go[i])
|
||||
{
|
||||
if (cabine.transform.Find("门把手") == null) continue;
|
||||
if (cabine.transform.Find("门把手") == null || GameManager.Inst.Cabinets_go[i].transform.Find("门把手") == null)
|
||||
continue;
|
||||
var door = cabine.transform.Find("门把手").GetComponentInChildren<Door>();
|
||||
if (door.TextMeshProUGUI.text == "关门") return;
|
||||
if (door.TextMeshProUGUI.text == "关门")
|
||||
continue;
|
||||
GameManager.Inst.power_open(cabine, "全开");
|
||||
door.TextMeshProUGUI.text = "关门";
|
||||
door.isopen = !door.isopen;
|
||||
}
|
||||
else if (cabine && cabine != GameManager.Inst.Cabinets_go[i] && cabine.transform.Find("门把手"))
|
||||
{
|
||||
if (cabine.transform.Find("门把手") == null) continue;
|
||||
if (cabine.transform.Find("门把手") == null ||
|
||||
GameManager.Inst.Cabinets_go[i].transform.Find("门把手") == null ||
|
||||
!GameManager.Inst.Cabinets_go[i].activeSelf)
|
||||
continue;
|
||||
var door = GameManager.Inst.Cabinets_go[i].transform.Find("门把手").GetComponentInChildren<Door>();
|
||||
if (door.TextMeshProUGUI.text == "开门") return;
|
||||
GameManager.Inst.power_close(cabine, "全关");
|
||||
if (door.TextMeshProUGUI.text == "开门")
|
||||
continue;
|
||||
GameManager.Inst.power_close(GameManager.Inst.Cabinets_go[i], "全关");
|
||||
door.TextMeshProUGUI.text = "开门";
|
||||
door.isopen = !door.isopen;
|
||||
}
|
||||
|
@ -697,7 +730,7 @@ public class ClickEvent : MonoBehaviour
|
|||
TransparentGlowManage.Inst.is_magnify = true;
|
||||
Vector3 center = renderer.bounds.center;
|
||||
//Vector3 targetPosition = new Vector3(center.x + yiDong_pos.x, center.y + yiDong_pos.y, center.z + yiDong_pos.z);
|
||||
Vector3 targetPosition = new Vector3(center.x, center.y, center.z)+ yiDong_pos;
|
||||
Vector3 targetPosition = new Vector3(center.x, center.y, center.z) + yiDong_pos;
|
||||
Quaternion targetRotation = Quaternion.Euler(fangDa_rot);
|
||||
Camera.main.transform.DOMove(targetPosition, 1f);
|
||||
Camera.main.transform.DORotateQuaternion(targetRotation, 1f).OnComplete(() =>
|
||||
|
|
|
@ -254,6 +254,12 @@ public class ExtendedFlycam : MonoBehaviour
|
|||
/// </summary>
|
||||
public void QuanJing()
|
||||
{
|
||||
for (int i = 0; i < CabinetUIManager.Instance.cabine_hights_now.Count; i++)
|
||||
{
|
||||
CabinetUIManager.Instance.cabine_hights_now[i].SetActive(true);
|
||||
}
|
||||
CabinetUIManager.Instance.cabine_hights_now.Clear();
|
||||
|
||||
CameraRtEnable();
|
||||
CameraRT.InitPanoramic();
|
||||
return;
|
||||
|
|
|
@ -12,11 +12,11 @@ public class TransparentGlow : MonoBehaviour
|
|||
{
|
||||
public bool isTransparentGlow = false;
|
||||
|
||||
private List<MeshRenderer> meshRenderers;
|
||||
[HideInInspector] public List<MeshRenderer> meshRenderers;
|
||||
/// <summary>
|
||||
/// 自身的
|
||||
/// </summary>
|
||||
private List<Material> materials;
|
||||
[HideInInspector] public List<Material> materials;
|
||||
/// <summary>
|
||||
/// 复制出来的
|
||||
/// </summary>
|
||||
|
@ -29,7 +29,7 @@ public class TransparentGlow : MonoBehaviour
|
|||
get
|
||||
{
|
||||
if (meshRenderers == null)
|
||||
meshRenderers = GetComponentsInChildren<MeshRenderer>().ToList();
|
||||
meshRenderers = GetComponentsInChildren<MeshRenderer>().ToList();
|
||||
return meshRenderers;
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class TransparentGlow : MonoBehaviour
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
return materials;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
/// 可以透明机器
|
||||
/// </summary>
|
||||
public List<Transform> points = new List<Transform>();
|
||||
public ClickEvent[] clickEvents;
|
||||
public List<ClickEvent> clickEvents = new List<ClickEvent>();
|
||||
/// <summary>
|
||||
/// 是否进入透明模式
|
||||
/// </summary>
|
||||
|
@ -80,7 +80,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
{
|
||||
ClickEvent clickEvent = item.GetComponent<ClickEvent>();
|
||||
BoxCollider boxCollider = item.GetComponent<BoxCollider>();
|
||||
DeviceItem deviceItem= item.GetComponent<DeviceItem>();
|
||||
DeviceItem deviceItem = item.GetComponent<DeviceItem>();
|
||||
//CabinetInfor cabinetInfor = item.GetComponent<CabinetInfor>();
|
||||
//Transform U = item.Find("U位");
|
||||
|
||||
|
@ -147,16 +147,24 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
clickEvents = FindObjectsOfType<ClickEvent>();
|
||||
for (int i = 0; i < clickEvents.Length; i++)
|
||||
clickEvents = FindObjectsOfType<ClickEvent>().ToList();
|
||||
//for (int i = 0; i < clickEvents.Count; i++)
|
||||
//{
|
||||
// if (clickEvents[i].Materials.Count >= 0)
|
||||
// {
|
||||
// for (int j = 0; j < clickEvents[i].Materials.Count; j++)
|
||||
// {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
|
||||
{
|
||||
if (clickEvents[i].Materials.Count >= 0)
|
||||
{
|
||||
for (int j = 0; j < clickEvents[i].Materials.Count; j++)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
var glow = GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>();
|
||||
glow.meshRenderers = null;
|
||||
glow.materials = null;
|
||||
for (int j = 0; j < glow.Materials.Count; j++)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,7 +203,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
{
|
||||
transparentGlows[i].F1();
|
||||
}
|
||||
for (int i = 0; i < clickEvents.Length; i++)
|
||||
for (int i = 0; i < clickEvents.Count; i++)
|
||||
{
|
||||
clickEvents[i].isTransparentGlow = true;
|
||||
}
|
||||
|
@ -212,7 +220,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
{
|
||||
transparentGlows[i].F2();
|
||||
}
|
||||
for (int i = 0; i < clickEvents.Length; i++)
|
||||
for (int i = 0; i < clickEvents.Count; i++)
|
||||
{
|
||||
clickEvents[i].isTransparentGlow = false;
|
||||
}
|
||||
|
@ -229,7 +237,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
{
|
||||
transparentGlows[i].F1();
|
||||
}
|
||||
for (int i = 0; i < clickEvents.Length; i++)
|
||||
for (int i = 0; i < clickEvents.Count; i++)
|
||||
{
|
||||
clickEvents[i].isTransparentGlow = true;
|
||||
}
|
||||
|
@ -246,7 +254,7 @@ public class TransparentGlowManage : MonoBehaviour
|
|||
{
|
||||
transparentGlows[i].F2();
|
||||
}
|
||||
for (int i = 0; i < clickEvents.Length; i++)
|
||||
for (int i = 0; i < clickEvents.Count; i++)
|
||||
{
|
||||
clickEvents[i].isTransparentGlow = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue