diff --git a/Assets/Resources/Images/IMG_DefalutIcon.png b/Assets/Resources/Images/IMG_DefalutIcon.png new file mode 100644 index 00000000..444c23cd Binary files /dev/null and b/Assets/Resources/Images/IMG_DefalutIcon.png differ diff --git a/Assets/Resources/Images/IMG_DefalutIcon.png.meta b/Assets/Resources/Images/IMG_DefalutIcon.png.meta new file mode 100644 index 00000000..e894134b --- /dev/null +++ b/Assets/Resources/Images/IMG_DefalutIcon.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: c5802470c3fb4754bba86eef138daa73 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Image/MQTTTestResult/IMG_FailIcon.png b/Assets/Resources/Images/IMG_FailIcon.png similarity index 100% rename from Assets/Image/MQTTTestResult/IMG_FailIcon.png rename to Assets/Resources/Images/IMG_FailIcon.png diff --git a/Assets/Image/MQTTTestResult/IMG_FailIcon.png.meta b/Assets/Resources/Images/IMG_FailIcon.png.meta similarity index 100% rename from Assets/Image/MQTTTestResult/IMG_FailIcon.png.meta rename to Assets/Resources/Images/IMG_FailIcon.png.meta diff --git a/Assets/Image/MQTTTestResult/IMG_SuccessIcon.png b/Assets/Resources/Images/IMG_SuccessIcon.png similarity index 100% rename from Assets/Image/MQTTTestResult/IMG_SuccessIcon.png rename to Assets/Resources/Images/IMG_SuccessIcon.png diff --git a/Assets/Image/MQTTTestResult/IMG_SuccessIcon.png.meta b/Assets/Resources/Images/IMG_SuccessIcon.png.meta similarity index 100% rename from Assets/Image/MQTTTestResult/IMG_SuccessIcon.png.meta rename to Assets/Resources/Images/IMG_SuccessIcon.png.meta diff --git a/Assets/Resources/Prefabs/UI/PRF_MQTTConnectionItem.prefab b/Assets/Resources/Prefabs/UI/PRF_MQTTConnectionItem.prefab index 9da63e61..eec069f9 100644 --- a/Assets/Resources/Prefabs/UI/PRF_MQTTConnectionItem.prefab +++ b/Assets/Resources/Prefabs/UI/PRF_MQTTConnectionItem.prefab @@ -34,7 +34,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 10.499992, y: 0} + m_AnchoredPosition: {x: 10.5, y: 0} m_SizeDelta: {x: 21, y: 21} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2551116707777971762 @@ -65,7 +65,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 092c4fc99ee91584d930b69a2926a277, type: 3} + m_Sprite: {fileID: 21300000, guid: c5802470c3fb4754bba86eef138daa73, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1137,13 +1137,13 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 7676949451849743307} - {fileID: 2081494434516734423} + - {fileID: 7676949451849743307} m_Father: {fileID: 6029866318953262369} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 83.5, y: -190} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 83.500015, y: 30} m_SizeDelta: {x: -333, y: 40} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4316208365858436923 @@ -1233,12 +1233,10 @@ RectTransform: - {fileID: 7802291444583939836} - {fileID: 7140421003607322157} - {fileID: 5319280790680272187} - - {fileID: 2409465826104916815} - {fileID: 379597478942034218} - {fileID: 5462667841529239013} - {fileID: 1693887338035721121} - {fileID: 8825133631318362178} - - {fileID: 8526485094171269008} - {fileID: 8388329608737497676} - {fileID: 4620234391147991730} m_Father: {fileID: 0} @@ -1246,7 +1244,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 583, y: 220} + m_SizeDelta: {x: 583, y: 180} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2575719433142104857 CanvasRenderer: @@ -1345,142 +1343,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4003389390085169589} m_CullTransparentMesh: 1 ---- !u!1 &4617730869522186888 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7115248029429128929} - - component: {fileID: 1863190725087911462} - - component: {fileID: 6090726597310434102} - m_Layer: 0 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7115248029429128929 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4617730869522186888} - 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: 8526485094171269008} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1863190725087911462 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4617730869522186888} - m_CullTransparentMesh: 1 ---- !u!114 &6090726597310434102 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4617730869522186888} - 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: 0 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: Test - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 69abd87f38225ed46aa612577c25f379, type: 2} - m_sharedMaterial: {fileID: -7290017371581542385, guid: 69abd87f38225ed46aa612577c25f379, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4285558896 - m_fontColor: {r: 0.4392157, g: 0.4392157, b: 0.4392157, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 16 - m_fontSizeBase: 16 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_TextWrappingMode: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 0 - m_ActiveFontFeatures: 6e72656b - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_EmojiFallbackSupport: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &5244346861865818874 GameObject: m_ObjectHideFlags: 0 @@ -1810,142 +1672,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 40, y: 20} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &6013032041850567338 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1423389078985016357} - - component: {fileID: 2990823342691973195} - - component: {fileID: 8893341559389614051} - m_Layer: 0 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1423389078985016357 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6013032041850567338} - 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: 2409465826104916815} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 85, y: 0} - m_SizeDelta: {x: 120, y: 40} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2990823342691973195 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6013032041850567338} - m_CullTransparentMesh: 1 ---- !u!114 &8893341559389614051 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6013032041850567338} - 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: Connection Test - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 4f170a218dfffe4489dc7ddd54bc15cf, type: 2} - m_sharedMaterial: {fileID: 6975767319296004534, guid: 4f170a218dfffe4489dc7ddd54bc15cf, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4285558896 - m_fontColor: {r: 0.4392157, g: 0.4392157, b: 0.4392157, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 16 - m_fontSizeBase: 16 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 1 - m_VerticalAlignment: 512 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_TextWrappingMode: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 0 - m_ActiveFontFeatures: 6e72656b - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_EmojiFallbackSupport: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &6872735410097360928 GameObject: m_ObjectHideFlags: 0 @@ -2231,7 +1957,7 @@ GameObject: - component: {fileID: 8458748578651207766} - component: {fileID: 4713296498140157138} m_Layer: 0 - m_Name: Button_ViewResults + m_Name: Button_TestMQTT m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2254,7 +1980,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 59, y: 0} + m_AnchoredPosition: {x: 60, y: 0} m_SizeDelta: {x: 60, y: 24} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2168975095235312477 @@ -2692,51 +2418,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8376188551342810451} m_CullTransparentMesh: 1 ---- !u!1 &8443765769311335949 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2409465826104916815} - - component: {fileID: 2307470290499782099} - m_Layer: 0 - m_Name: Connection Test - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2409465826104916815 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8443765769311335949} - 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: 1423389078985016357} - m_Father: {fileID: 6029866318953262369} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 125, y: 70} - m_SizeDelta: {x: 250, y: 40} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2307470290499782099 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8443765769311335949} - m_CullTransparentMesh: 1 --- !u!1 &8452262920164209762 GameObject: m_ObjectHideFlags: 0 @@ -2873,127 +2554,6 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &8761055319915315992 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8526485094171269008} - - component: {fileID: 4708186645858634878} - - component: {fileID: 7345194138902725981} - - component: {fileID: 7494914256502275596} - m_Layer: 0 - m_Name: Button_TestMQTT - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &8526485094171269008 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8761055319915315992} - 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: 7115248029429128929} - m_Father: {fileID: 6029866318953262369} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 83.5, y: -150} - m_SizeDelta: {x: -333, y: 24} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &4708186645858634878 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8761055319915315992} - m_CullTransparentMesh: 1 ---- !u!114 &7345194138902725981 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8761055319915315992} - 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: 027d3b1aa1504584db7344ecf13dfc85, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &7494914256502275596 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8761055319915315992} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 7345194138902725981} - m_OnClick: - m_PersistentCalls: - m_Calls: [] --- !u!1 &8829135613240903342 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Studio/Connect/TemporaryMQTTClient.cs b/Assets/Scripts/Studio/Connect/TemporaryMQTTClient.cs index 37fbeb34..5cc61c8e 100644 --- a/Assets/Scripts/Studio/Connect/TemporaryMQTTClient.cs +++ b/Assets/Scripts/Studio/Connect/TemporaryMQTTClient.cs @@ -15,13 +15,17 @@ namespace Studio.Connection string domain; int port; List topics; - Action callback; - public TemporaryMQTTClient(string domain, int port, List topic, Action callback) + Action topicCallback; + Action errorCallback; + Action connectedCallback; + public TemporaryMQTTClient(string domain, int port, List topic, Action topicCallback, Action connectedCallback, Action errorCallback) { this.domain = domain; this.port = port; this.topics = topic; - this.callback = callback; + this.topicCallback = topicCallback; + this.connectedCallback = connectedCallback; + this.errorCallback = errorCallback; var optionBuilder = new ConnectionOptionsBuilder() .WithTCP(domain, port) .Build(); @@ -44,7 +48,7 @@ namespace Studio.Connection { string payload = Encoding.UTF8.GetString(message.Payload.Data, message.Payload.Offset, message.Payload.Count); Debug.Log($"Temporary MQTT is OnTopic. {ToString()}, msg={payload}"); - callback(topicName, payload); + topicCallback(topicName, payload); this.topics.Remove(topicName); client.CreateUnsubscribePacketBuilder(topicName) @@ -66,6 +70,7 @@ namespace Studio.Connection private void OnErrorMQTT(MQTTClient client, string error) { + errorCallback(); Debug.Log($"Temporary MQTT Client Error. {ToString()}, error={error}"); //Disconnect(); } @@ -82,6 +87,7 @@ namespace Studio.Connection private void OnConnectedMQTT(MQTTClient client) { + connectedCallback(); Debug.Log($"Temporary MQTT Client is OnConnected. {ToString()}"); foreach (var t in topics) { diff --git a/Assets/Scripts/Studio/UI/Elements/UI_MQTTConnection.cs b/Assets/Scripts/Studio/UI/Elements/UI_MQTTConnection.cs index be43354d..d1d00857 100644 --- a/Assets/Scripts/Studio/UI/Elements/UI_MQTTConnection.cs +++ b/Assets/Scripts/Studio/UI/Elements/UI_MQTTConnection.cs @@ -21,6 +21,8 @@ namespace Studio.UI private Button Button_Remove; private RectTransform TopicItemContent; private RectTransform AddTopic; + private Image Image_Check; + private Sprite defaultSprite,connectedSprite, errorSprite; private UI_InputTopicItem prf_InputTopicItem; private List inputTopicItems = new List(); @@ -34,10 +36,12 @@ namespace Studio.UI public override void AfterAwake() { prf_InputTopicItem = Resources.Load("Prefabs/UI/PRF_InputTopicItem"); + defaultSprite = Resources.Load("Images/IMG_DefalutIcon"); + connectedSprite = Resources.Load("Images/IMG_SuccessIcon"); + errorSprite = Resources.Load("Images/IMG_FailIcon"); Button_AddTopicItem.onClick.AddListener(OnClickAddURLItemButton); Button_TestMQTT.onClick.AddListener(OnClickMQTTTest); Button_Remove.onClick.AddListener(OnClickRemoveItemButton); - panel_MQTTTestResult = CanvasManager.instance.GetCanvas().panel_mqtttestresult; inputTopicItems.Clear(); } @@ -52,6 +56,7 @@ namespace Studio.UI private void OnClickMQTTTest() { Debug.Log("On Click MQTT Test"); + Image_Check.sprite = defaultSprite; onMQTTTest?.Invoke(); var domain = InputField_Domain.text; @@ -63,7 +68,7 @@ namespace Studio.UI var topic = item.InputField_Topic.text; topics.Add(topic); } - var tmpClient = new TemporaryMQTTClient(domain, port, topics, OnTopicTest); + var tmpClient = new TemporaryMQTTClient(domain, port, topics, OnTopicTest, OnConnectedClient, OnErrorClient); panel_MQTTTestResult.Open(domain, port.ToString()); } @@ -78,7 +83,14 @@ namespace Studio.UI }; panel_MQTTTestResult.AddResult(result); } - + private void OnConnectedClient() + { + Image_Check.sprite = connectedSprite; + } + void OnErrorClient() + { + Image_Check.sprite = errorSprite; + } private void OnClickRemoveItemButton() { onRemoveMQTTConnectionItem?.Invoke(this);