njh/250520_00 #80

Merged
UVCXR merged 2 commits from njh/250520_00 into main 2025-05-21 09:12:24 +09:00
19 changed files with 1463 additions and 77 deletions
Showing only changes of commit 4c02c24680 - Show all commits

File diff suppressed because one or more lines are too long

8
Assets/Image/UI.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ef1eb64dbdc563248ac417502b9515f8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: d5c740338b0b3784783863fc03a6103b
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: 32
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 77e1ed9673c521845a19bbb0c6f3d2ac
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,699 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1059381736295062812
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 737975776538001360}
- component: {fileID: 3960599325500948599}
- component: {fileID: 6709583690790133261}
- component: {fileID: 8842309167513454781}
- component: {fileID: 5435175404900251358}
m_Layer: 5
m_Name: UIAccordionButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &737975776538001360
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1059381736295062812}
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: 196178553544464258}
- {fileID: 7090221084841866353}
m_Father: {fileID: 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: 235, y: 28}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3960599325500948599
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1059381736295062812}
m_CullTransparentMesh: 1
--- !u!114 &6709583690790133261
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1059381736295062812}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 0
--- !u!114 &8842309167513454781
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1059381736295062812}
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: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5435175404900251358
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1059381736295062812}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 2
m_Spacing: 8
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &1299385343970943506
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7090221084841866353}
- component: {fileID: 316331744210409639}
- component: {fileID: 5965171817824629373}
- component: {fileID: 4887237700075556470}
m_Layer: 5
m_Name: BarList
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7090221084841866353
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1299385343970943506}
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: 737975776538001360}
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: 235, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &316331744210409639
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1299385343970943506}
m_CullTransparentMesh: 1
--- !u!114 &5965171817824629373
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1299385343970943506}
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: 0.392}
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: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4887237700075556470
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1299385343970943506}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 5
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &2547528749068704130
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5075256584588690205}
- component: {fileID: 4209982622606330853}
- component: {fileID: 8803601974984384233}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5075256584588690205
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2547528749068704130}
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: 4665194164954384371}
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 &4209982622606330853
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2547528749068704130}
m_CullTransparentMesh: 1
--- !u!114 &8803601974984384233
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2547528749068704130}
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: Button
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: 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: 24
m_fontSizeBase: 24
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 &3343749276535544741
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4665194164954384371}
- component: {fileID: 2861147624831201851}
- component: {fileID: 2648500044973374710}
- component: {fileID: 3548683004314324370}
- component: {fileID: 3032724165209384695}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4665194164954384371
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3343749276535544741}
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: 5075256584588690205}
m_Father: {fileID: 196178553544464258}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -12, y: 0}
m_SizeDelta: {x: -24, y: 24}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2861147624831201851
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3343749276535544741}
m_CullTransparentMesh: 1
--- !u!114 &2648500044973374710
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3343749276535544741}
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: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &3548683004314324370
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3343749276535544741}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 2648500044973374710}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &3032724165209384695
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3343749276535544741}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5ee25828847e2554a8f07bfdb12c527d, type: 3}
m_Name:
m_EditorClassIdentifier:
selected: 0
Space: 8
normalColor: {r: 0, g: 0, b: 0, a: 0}
HighLightColor: {r: 0, g: 0, b: 0, a: 0}
selectColor: {r: 0, g: 0, b: 0, a: 0}
normalSprite: {fileID: 0}
selectSprite: {fileID: 0}
onClickButton:
m_PersistentCalls:
m_Calls: []
--- !u!1 &7082614517144068525
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 164667544414232371}
- component: {fileID: 4963730722805779233}
- component: {fileID: 9217914633753174366}
- component: {fileID: 6654956653012459210}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &164667544414232371
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7082614517144068525}
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: 196178553544464258}
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: -12, y: 0}
m_SizeDelta: {x: 16, y: 16}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4963730722805779233
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7082614517144068525}
m_CullTransparentMesh: 1
--- !u!114 &9217914633753174366
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7082614517144068525}
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: 0}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &6654956653012459210
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7082614517144068525}
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: d5c740338b0b3784783863fc03a6103b, 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 &8242711767932382719
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 196178553544464258}
- component: {fileID: 2391332731856750830}
- component: {fileID: 5410162437473154471}
m_Layer: 5
m_Name: HeadLine
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &196178553544464258
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8242711767932382719}
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: 164667544414232371}
- {fileID: 4665194164954384371}
m_Father: {fileID: 737975776538001360}
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: 235, y: 28}
m_Pivot: {x: 0, y: 1}
--- !u!222 &2391332731856750830
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8242711767932382719}
m_CullTransparentMesh: 1
--- !u!114 &5410162437473154471
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8242711767932382719}
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: 0}
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: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: df682d2412bf01e4cabb827c9b490132
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,282 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1103117457639292196
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2955246670373270637}
- component: {fileID: 2054444802996249088}
- component: {fileID: 7288995949574559143}
m_Layer: 5
m_Name: Text_Name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2955246670373270637
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1103117457639292196}
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: 6979262846185234204}
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 &2054444802996249088
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1103117457639292196}
m_CullTransparentMesh: 1
--- !u!114 &7288995949574559143
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1103117457639292196}
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: Button
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: 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: 24
m_fontSizeBase: 24
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 &2940723019932460568
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6979262846185234204}
- component: {fileID: 6956058148239678376}
- component: {fileID: 5241126291345577379}
- component: {fileID: 4981626796543352058}
- component: {fileID: 8594547475631660946}
m_Layer: 5
m_Name: UVCButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6979262846185234204
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2940723019932460568}
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: 2955246670373270637}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 180, y: 32}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6956058148239678376
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2940723019932460568}
m_CullTransparentMesh: 1
--- !u!114 &5241126291345577379
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2940723019932460568}
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: e4fc3befe92ee044f98721b777e4188a, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 2.5
--- !u!114 &4981626796543352058
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2940723019932460568}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5241126291345577379}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &8594547475631660946
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2940723019932460568}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5ee25828847e2554a8f07bfdb12c527d, type: 3}
m_Name:
m_EditorClassIdentifier:
selected: 0
Space: 8
normalColor: {r: 0, g: 0, b: 0, a: 0}
HighLightColor: {r: 0, g: 0, b: 0, a: 0}
selectColor: {r: 0, g: 0, b: 0, a: 0}
normalSprite: {fileID: 0}
selectSprite: {fileID: 0}
onClickButton:
m_PersistentCalls:
m_Calls: []

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 03a456e80b12cde4083f49fad9528537
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using System;
using UnityEngine;
namespace XED
{
[Serializable]
public class APITotalBoardEntity
{
public int TotalRequestPacketSize;
public int AverageRequestPacketSize;
public int TotalResponsePacketSize;
public int AverageResponsePacketSize;
public long MaximumResponseTime;
public long AverageResponseTime;
public string MaximumRequestPacketAPI;
public string MaximumResponsePacketAPI;
public string MaximumResponseTimeAPI;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3ab2df513885b1549b6a095aef718b77

View File

@@ -14,12 +14,13 @@ namespace Studio.Setting.Connect
[System.Serializable]
public class ResponseModel<T>
{
public int requestsize;
public int status;
public string code;
public string message;
public T data;
public override string ToString()
{
return $"ResponseModel status:{status}, code:{code} message:{message} data:{data}";

View File

@@ -1,8 +1,13 @@
using Best.HTTP;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Studio.Auth;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net.Http;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
@@ -11,6 +16,7 @@ namespace Studio.Conifg
{
public class RestAPI
{
private static Dictionary<string, string> headers = new();
public static async Task<T> RequestPost<T>(string url, Dictionary<string, object> body = null, bool useAuth = true)
{
return await Request<T>(url, body, HTTPMethods.Post, useAuth);
@@ -36,31 +42,80 @@ namespace Studio.Conifg
url = $"http://{Constants.APIDomain}:{Constants.APIPort}{url}";
var request = SelectHTTPRequest(method, url);
//
string requestLine = $"{method} {url} HTTP/1.1\r\n";
int requestLineSize = Encoding.UTF8.GetBytes(requestLine).Length;
request.DownloadSettings = new Best.HTTP.Request.Settings.DownloadSettings() { ContentStreamMaxBuffered = 1024 * 1024 * 200 };
request.MethodType = method;
request.SetHeader("Content-Type", "application/json; charset=utf-8");
AddHeader(request, "Content-Type", "application/json; charset=utf-8");
if (useAuth) request.SetHeader("access-token", AuthService.Instance.Entiti.accessToken);
if (useAuth) AddHeader(request,"access-token", AuthService.Instance.Entiti.accessToken);
var bodySize = 0;
if (body != null)
{
if (body is string)
{
request.UploadSettings.UploadStream =
if(!string.IsNullOrEmpty(body as string))
{
request.UploadSettings.UploadStream =
new MemoryStream(Encoding.UTF8.GetBytes(body as string));
bodySize = Encoding.UTF8.GetBytes(body as string).Length;
}
}
else if (body is Dictionary<string, object>)
{
var stringJson = JsonConvert.SerializeObject(body);
request.UploadSettings.UploadStream =
new MemoryStream(Encoding.UTF8.GetBytes(JsonUtility.ToJson(body)));
new MemoryStream(Encoding.UTF8.GetBytes(stringJson));
bodySize = Encoding.UTF8.GetBytes(stringJson).Length;
}
}
var packetSize = Size(url, method);
packetSize += bodySize+ requestLineSize;
var response = await request.GetAsStringAsync();
return JsonUtility.FromJson<T>(response);
headers.Clear();
response = RemoveUnnecessary(response);
JsonTextReader reader = new JsonTextReader(new StringReader(response));
//ReadJson<T>(JsonConvert.DeserializeObject<T>(response));
//response.Replace("{", "{" + $"requestsize{packetSize},");
return JsonConvert.DeserializeObject<T>(response);
}
private static string RemoveUnnecessary(string respone)
{
var result = respone.Replace("\\", "");
return result;
}
private static void AddHeader(HTTPRequest request,string key,string value)
{
request.SetHeader(key, value);
headers.Add(key, value);
}
private static int Size(string url, HTTPMethods method)
{
int packetSize = 0;
// (1) Request Line
Uri uri = new Uri(url);
string requestLine = $"{method} {uri.PathAndQuery}";
packetSize += Encoding.UTF8.GetByteCount(requestLine);
// (2) Headers
foreach (var header in headers)
{
string headerLine = $"{header.Key}: {header.Value}\r\n";
packetSize += Encoding.UTF8.GetByteCount(headerLine);
}
packetSize += 2; // 헤더 끝의 "\r\n"
return packetSize;
}
private static HTTPRequest SelectHTTPRequest(HTTPMethods methods, string url, OnRequestFinishedDelegate onRequest = null)
{
switch (methods)

View File

@@ -11,16 +11,23 @@ namespace Studio.Setting.Connect
private APIState state;
public APIState State { get => state; }
private string? entity;
public string Entity { get => entity; }
private T? entity;
public T? Entity { get => entity; }
private int reqSize;
public int ReqSize { get => reqSize; }
private string? message;
public string? Message { get => message; }
public StudioEntityWithState(APIState state, string entity , string? message = null)
public StudioEntityWithState()
{
}
public StudioEntityWithState(APIState state, T entity ,int reqSize =0,string? message = null)
{
this.state = state;
this.entity = entity;
this.reqSize = reqSize;
this.message = message;
}
}

View File

@@ -51,22 +51,23 @@ namespace Studio
return builder.WithKeepAlive(60 * 60);//keep alive 1시간으로
}
public async Task<StudioEntityWithState<string>> BaseInfo(string url)
public async Task<StudioEntityWithState<object>> BaseInfo(string url)
{
try
{
return await Task.Run<StudioEntityWithState<string>>(async () =>
return await Task.Run<StudioEntityWithState<object>>(async () =>
{
ResponseModel<string> response = await RestAPI.RequestPost<ResponseModel<string>>(url);
ResponseModel<object> response = await RestAPI.RequestGet<ResponseModel<object>>(url);
Debug.Log(response);
if (response.code == "SUCCESS")
return new StudioEntityWithState<string>(APIState.Loaded, response.data);
return new StudioEntityWithState<object>(APIState.Loaded, response.data,response.requestsize);
return new StudioEntityWithState<string>(APIState.Error, null, response.message);
return new StudioEntityWithState<object>(APIState.Error, null, 0,response.message);
});
}
catch (Exception e)
{
return new StudioEntityWithState<string>(APIState.Error, null, e.Message);
return new StudioEntityWithState<object>(APIState.Error, null,0, e.Message);
}
}
@@ -84,7 +85,7 @@ namespace Studio
{
if (Application.isPlaying)
{
//MQTT재시작
}
}
@@ -131,13 +132,13 @@ namespace Studio
{
string key = prop.Name.ToString();
string value = prop.Value.ToString();
Debug.Log($"kEY : {key}, Value:{value}");
// Debug.Log($"kEY : {key}, Value:{value}");
}
var T = json["data"];
var split = T.ToString().Split('[');
var t = $"[{split[1]}";
Debug.Log(T.ToString());
//Debug.Log(T.ToString());
JArray jarray = JArray.Parse(t);
var list = new Dictionary<string, Dictionary<string, string>>();
foreach (JObject obj in jarray.Children())
@@ -151,17 +152,16 @@ namespace Studio
string value = prop.Value.ToString();
if (index == 0)
{
list.Add(value, new());
if (!list.ContainsKey(value))
list.Add(value, new());
id = value;
index = 1;
}
keyvalue.Add(key, value);
// Debug.Log($"kEY : {key}, Value:{value}");
}
list[id] = keyvalue;
}
//JObject json2 = JObject.Parse(jarray.ToString());
CheckUpdate(type, list);
//var json = JsonConvert.SerializeObject(t.ToString());
}
private void CheckUpdate(string type, Dictionary<string, Dictionary<string, string>> data)

View File

@@ -1,18 +1,19 @@
using System.Collections.Generic;
using System;
using UnityEngine;
using Studio;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Studio.Setting.Connect;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using XED;
namespace Studio
{
public class StudioServiceTypeEventArgs : EventArgs
{
public readonly string Type;
List<IStudioEntity> Entitis;
Dictionary<string, string> Entitis;
public StudioServiceTypeEventArgs(string type, List<IStudioEntity> entity)
public StudioServiceTypeEventArgs(string type, Dictionary<string, string> entity)
{
Type = type;
Entitis = entity;
@@ -27,68 +28,215 @@ namespace Studio
static StudioService() { }
#endregion
private Dictionary<string, EventHandler<StudioServiceTypeEventArgs>> listenerTypeMap;
private Dictionary<string, Dictionary<string, EventHandler<StudioServiceTypeEventArgs>>> listenerIdMap;
private StudioRepoistory repository;
private Dictionary<string, float> updateTime = new();
private int totalRequestPacket;
private int totalResponsePacket;
private long maxElapsedTime;
private long totalElapsedTime;
private int maxReponesSize;
private int maxReuqestSize;
private string maxReuqestApi;
private string maxResponseApi;
private string maxResponseTimeApi;
public Dictionary<string, StudioEntityWithState<object>> baseData = new();
//private string
private StudioService(StudioRepoistory repository)
{
this.repository = repository;
listenerTypeMap = new Dictionary<string, EventHandler<StudioServiceTypeEventArgs>>();
listenerIdMap = new Dictionary<string, Dictionary<string, EventHandler<StudioServiceTypeEventArgs>>>();
repository.OnTopicList += OnTopicList;
// repository.OnDetectedError += OnDetectedError;
// repository.OnDetectedError += OnDetectedError;
}
public void ConnectMQTT()
{
repository.MQTTConnect();
}
public void SubscribeMQTT(string topic)
{
repository.Subscribe(topic);
}
//Que에 담아둔다?
private void OnTopicList(string type, Dictionary<string, Dictionary<string, string>> entities)
{
foreach(var idKey in entities)
foreach (var idKey in entities)
{
UpdateTopicData(type, idKey.Value);
UpdateTopicData(type, idKey.Key, idKey.Value);
}
}
private void UpdateTopicData(string type, Dictionary<string, string> entity)
private async Task UpdateTopicData(string type, string id, Dictionary<string, string> entity)
{
if (!updateTime.ContainsKey(type))
updateTime.Add(type, 0.5f);
var time = updateTime[type];
var task = Task.Run(async () =>
{
var st = string.Empty;
st = $"{type}:";
int delayTime = (int)(time * 1000);
await Task.Delay(delayTime);
DispatchMachineEvent(type, id, entity);
});
}
public void AddTypeListener(string type, EventHandler<StudioServiceTypeEventArgs> listener)
private Dictionary<string, Dictionary<string, Dictionary<string, string>>> timelineEntity = new();
public bool TryGetRecentTimelineEntity(string type, string id, out Dictionary<string, string> result)
{
if (!listenerTypeMap.ContainsKey(type))
result = null;
if (!timelineEntity.ContainsKey(type))
{
listenerTypeMap[type] = listener;
timelineEntity[type] = new Dictionary<string, Dictionary<string, string>>();
return false;
}
if (!timelineEntity[type].ContainsKey(id))
{
timelineEntity[type][id] = new();
return false;
}
result = timelineEntity[type][id];
return result != null;
}
public void AddTypeListener(string type, string id, EventHandler<StudioServiceTypeEventArgs> listener)
{
if (!listenerIdMap.ContainsKey(type))
{
listenerIdMap.Add(type, new());
//Debug.LogError($"Key Value is missing!!!! -Key:{type}-");
}
if (!listenerIdMap[type].ContainsKey(id))
{
listenerIdMap[type][id] = listener;
}
else
{
listenerTypeMap[type] += listener;
listenerIdMap[type][id] += listener;
}
}
public async Task LoadBaeData(string url)
public async Task LoadBaseData(string url)
{
StudioEntityWithState<string> data = await repository.BaseInfo(url);
if(data.State.Equals(APIState.Loaded))
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
StudioEntityWithState<object> data = await repository.BaseInfo(url);
sw.Stop();
var t = sw.ElapsedMilliseconds;
if (data.State.Equals(APIState.Loaded))
{
//Debug.Log("Test");
//UpdateEntity<IStudioEntity>(data.Entity);
if (!baseData.ContainsKey(url))
baseData.Add(url, new());
baseData[url] = data;
CheckAPIBoarder(data.Entity.ToString(), data.ReqSize, url, t);
UpdateEntity(url, data.Entity.ToString());
}
else if(data.State == APIState.Error)
else if (data.State == APIState.Error)
{
//TODO 에러메세지
Debug.Log($"APIState : Error , Message :{data.Message}");
}
}
public void UpdateEntity(IStudioEntity data)
private void CheckAPIBoarder(string data, int reqSize, string url, long time)
{
//DispatchMachineEvent()
var byteSize = System.Text.Encoding.Default.GetBytes(data).Length;
if (maxElapsedTime < time)
{
maxElapsedTime = time;
maxResponseTimeApi = url;
}
if (maxReponesSize > byteSize)
{
maxReponesSize = byteSize;
maxResponseApi = url;
}
if (maxReuqestSize < reqSize)
{
maxReuqestSize = reqSize;
maxReuqestApi = url;
}
totalRequestPacket += reqSize;
totalResponsePacket += byteSize;
totalElapsedTime += time;
}
private void DispatchMachineEvent(string type, List<IStudioEntity> entity)
public APITotalBoardEntity GetAPIStatusBoarder()
{
if (listenerTypeMap.ContainsKey(type))
var boardEntity = new APITotalBoardEntity();
boardEntity.TotalRequestPacketSize = totalRequestPacket;
boardEntity.AverageRequestPacketSize = totalRequestPacket / baseData.Count;
boardEntity.TotalResponsePacketSize = totalResponsePacket;
boardEntity.AverageResponsePacketSize = totalResponsePacket / baseData.Count;
boardEntity.MaximumResponseTime = maxElapsedTime;
boardEntity.AverageResponseTime = totalElapsedTime / baseData.Count;
boardEntity.MaximumRequestPacketAPI = maxReuqestApi;
boardEntity.MaximumResponsePacketAPI = maxResponseApi;
boardEntity.MaximumResponseTimeAPI = maxResponseTimeApi;
return boardEntity;
//JsonUtility.ToJson()
}
public void UpdateEntity(string type, string data)
{
//Dcitionary 형으로 바꿈
JObject json = JObject.Parse(data);
foreach (JProperty prop in json.Children())
{
listenerTypeMap[type].Invoke(this, new StudioServiceTypeEventArgs(type, entity));
string key = prop.Name.ToString();
string value = prop.Value.ToString();
Debug.Log($"kEY : {key}, Value:{value}");
}
var datas = json["rows"].ToString();
JArray jarray = JArray.Parse(datas);
foreach (JObject obj in jarray.Children())
{
Dictionary<string, string> keyvalue = new();
int index = 0;
string id = string.Empty;
foreach (JProperty prop in obj.Children())
{
string key = prop.Name.ToString();
string value = prop.Value.ToString();
if (index == 0)
{
id = value;
index = 1;
}
keyvalue.Add(key, value);
}
DispatchMachineEvent(type, id, keyvalue);
}
}
private void DispatchMachineEvent(string type, string id, Dictionary<string, string> entity)
{
if (!listenerIdMap.ContainsKey(type))
{
Debug.LogError($"Key Value is missing!!!! -Key:{type}-");
}
if (listenerIdMap[type].ContainsKey(id))
{
listenerIdMap[type][id].Invoke(this, new StudioServiceTypeEventArgs(type, entity));
}
}
}
}

View File

@@ -1,4 +1,4 @@
using XRLib;
using XRLib;
using XRLib.UI;
using UnityEngine;
using XED.Manage;

View File

@@ -8,7 +8,7 @@ using UnityEngine.UI;
namespace Studio.UVC.UI
{
[RequireComponent(typeof(RectTransform))]
public class UVCButton : UnityEngine.MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
public class UVCButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
private static GameObject prefab;
@@ -28,8 +28,9 @@ namespace Studio.UVC.UI
public int Index { get; set; }
private TextMeshProUGUI txt;
private UnityEngine.UI.Button button;
public Button UVCClickButton { get { return button; } }
private RectTransform rect;
public RectTransform Rect { get { return rect; } }
@@ -42,6 +43,7 @@ namespace Studio.UVC.UI
public Color normalColor;
public Color HighLightColor;
public Color selectColor;
[Header("Sprite")]
public Sprite normalSprite;
public Sprite selectSprite;
@@ -53,7 +55,7 @@ namespace Studio.UVC.UI
button = GetComponent<UnityEngine.UI.Button>();
rect = GetComponent<RectTransform>();
image = GetComponent<Image>();
button.navigation = new Navigation() { mode = Navigation.Mode.None };
if (button != null)
{
button.onClick.AddListener(() =>
@@ -63,9 +65,6 @@ namespace Studio.UVC.UI
onClickButton.Invoke();
});
}
if (selected) Select();
else Deselect();
}
/// <summary>

View File

@@ -1,4 +1,4 @@
using TMPro;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
@@ -7,7 +7,7 @@ using UnityEngine.UI;
namespace Studio.UVC.UI
{
[RequireComponent(typeof(RectTransform))]
public class UVCTabButton : UnityEngine.MonoBehaviour, ITabButton, IPointerEnterHandler, IPointerExitHandler
public class UVCTabButton : MonoBehaviour, ITabButton, IPointerEnterHandler, IPointerExitHandler
{
private static GameObject prefab;
@@ -31,7 +31,7 @@ namespace Studio.UVC.UI
private TextMeshProUGUI txt;
private UnityEngine.UI.Button button;
private RectTransform rect;
public RectTransform Rect { get { return rect; } }
@@ -74,11 +74,11 @@ namespace Studio.UVC.UI
/// </summary>
/// <param name="text">Title Name</param>
/// <param name="isSize">autosizeing</param>
public void SetText(string text,bool isAutoSize)
public void SetText(string text, bool isAutoSize)
{
txt.text = text;
if(isAutoSize)
rect.sizeDelta = new Vector2(txt.preferredWidth + Space, rect.sizeDelta.y);
if (isAutoSize)
rect.sizeDelta = new Vector2(txt.preferredWidth + Space, rect.sizeDelta.y);
}
/// <summary>
@@ -115,7 +115,7 @@ namespace Studio.UVC.UI
/// <param name="_normalColor"></param>
/// <param name="_highLightColor"></param>
/// <param name="_selectColor"></param>
public void SetButtonColor(Color _normalColor, Color _highLightColor, Color _selectColor)
public void SetButtonColor(Color _normalColor, Color _highLightColor, Color _selectColor)
{
normalColor = _normalColor;
highLightColor = _highLightColor;
@@ -140,7 +140,7 @@ namespace Studio.UVC.UI
image.color = selectColor;
else
image.sprite = normalSprite;
image.color = normalColor;
image.color = normalColor;
}
}
}