接入聊天
This commit is contained in:
File diff suppressed because it is too large
Load Diff
153
Assets/Resources/avatar.prefab
Normal file
153
Assets/Resources/avatar.prefab
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1456191088947791446
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4325063247174311346}
|
||||||
|
- component: {fileID: 1231316361559889911}
|
||||||
|
- component: {fileID: 1243992536067605129}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: image
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4325063247174311346
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1456191088947791446}
|
||||||
|
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: 2655512961345531349}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 100, y: 100}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &1231316361559889911
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1456191088947791446}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1243992536067605129
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1456191088947791446}
|
||||||
|
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: d9625485d797b394986a962fa70dc17b, 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 &7937851028005648998
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2655512961345531349}
|
||||||
|
- component: {fileID: 3186304737070163309}
|
||||||
|
- component: {fileID: 4156074741668895120}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: avatar
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2655512961345531349
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7937851028005648998}
|
||||||
|
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: 4325063247174311346}
|
||||||
|
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: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &3186304737070163309
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7937851028005648998}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &4156074741668895120
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7937851028005648998}
|
||||||
|
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: 6c405f3d1b7fdcc48869d9866261a036, 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
|
||||||
7
Assets/Resources/avatar.prefab.meta
Normal file
7
Assets/Resources/avatar.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7ff80b2e795a35c409eaca3517844c6e
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1366,7 +1366,7 @@ GameObject:
|
|||||||
- component: {fileID: 457781583}
|
- component: {fileID: 457781583}
|
||||||
- component: {fileID: 457781582}
|
- component: {fileID: 457781582}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: GameObject
|
m_Name: Main
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -1399,12 +1399,6 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!224 &465361218 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 5467042597978700984, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 3718681616507437211}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &474040020
|
--- !u!1 &474040020
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1595,57 +1589,6 @@ RectTransform:
|
|||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0, y: 0}
|
m_Pivot: {x: 0, y: 0}
|
||||||
--- !u!1 &584576337
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 584576338}
|
|
||||||
- component: {fileID: 584576339}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Pool
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &584576338
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 584576337}
|
|
||||||
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: 739619257}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 100, y: 100}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &584576339
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 584576337}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 1970feb7fdb702645b753cd8ed1be4ea, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
prefab: {fileID: 3634656016516224787, guid: ad69af7e0b1064245a47eab7445ace67, type: 3}
|
|
||||||
preload: 20
|
|
||||||
parent: {fileID: 696458140}
|
|
||||||
--- !u!1 &640709220
|
--- !u!1 &640709220
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1800,12 +1743,6 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 678698531}
|
m_GameObject: {fileID: 678698531}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
--- !u!224 &696458140 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 6975938451169501548, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 3718681616507437211}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &707600074
|
--- !u!1 &707600074
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -2022,12 +1959,6 @@ MonoBehaviour:
|
|||||||
m_MipBias: 0
|
m_MipBias: 0
|
||||||
m_VarianceClampScale: 0.9
|
m_VarianceClampScale: 0.9
|
||||||
m_ContrastAdaptiveSharpening: 0
|
m_ContrastAdaptiveSharpening: 0
|
||||||
--- !u!224 &739619257 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 5961383426537816645, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 3718681616507437211}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &848285179
|
--- !u!1 &848285179
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -3327,12 +3258,6 @@ AudioSource:
|
|||||||
m_PreInfinity: 2
|
m_PreInfinity: 2
|
||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
--- !u!224 &1231091067 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 6018946838727076121, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 3718681616507437211}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &1258234879
|
--- !u!1 &1258234879
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -5068,57 +4993,6 @@ MonoBehaviour:
|
|||||||
min: 8
|
min: 8
|
||||||
max: 208
|
max: 208
|
||||||
m_Loopback: 0
|
m_Loopback: 0
|
||||||
--- !u!1 &1959284014
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1959284015}
|
|
||||||
- component: {fileID: 1959284016}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Pool
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1959284015
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1959284014}
|
|
||||||
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: 1231091067}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 100, y: 100}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &1959284016
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1959284014}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 1970feb7fdb702645b753cd8ed1be4ea, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
prefab: {fileID: 8495991377958309690, guid: ac2316fabaf14dc409bee0e9c34cae94, type: 3}
|
|
||||||
preload: 20
|
|
||||||
parent: {fileID: 465361218}
|
|
||||||
--- !u!1 &2028247179
|
--- !u!1 &2028247179
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -5808,36 +5682,6 @@ PrefabInstance:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransformParent: {fileID: 55636240}
|
m_TransformParent: {fileID: 55636240}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 165118061684116296, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 165118061684116296, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 165118061684116296, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 165118061684116296, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 165118061684116296, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 165118061684116296, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 674764666495542323, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 674764666495542323, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
@@ -5868,42 +5712,22 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 765493694211344253, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 979448543686126123, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 979448543686126123, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: MainPanel
|
value: MainPanel
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2137318455400373245, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 1201540108501141588, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2137318455400373245, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2137318455400373245, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2137318455400373245, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2137318455400373245, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 1875627317724447898, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2137318455400373245, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2574769142839816776, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 1
|
value: 1
|
||||||
@@ -5938,6 +5762,21 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2977466294533182884, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.b
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2977466294533182884, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.g
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2977466294533182884, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.r
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3608820285885576044, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 3608820285885576044, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Pivot.x
|
propertyPath: m_Pivot.x
|
||||||
@@ -6038,66 +5877,11 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3717700843958748948, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 4432216805467735932, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3717700843958748948, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3717700843958748948, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3717700843958748948, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3717700843958748948, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3717700843958748948, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4245892960274939677, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4245892960274939677, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4245892960274939677, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4245892960274939677, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4245892960274939677, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4245892960274939677, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4595042593999019917, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 4595042593999019917, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
@@ -6128,7 +5912,12 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5467042597978700984, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 4671956458777926765, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5122494875432740167, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 0
|
value: 0
|
||||||
@@ -6163,32 +5952,22 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7500051454580514407, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 7147764517796332529, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7500051454580514407, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 7147764517796332529, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMin.y
|
propertyPath: m_AnchorMin.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7500051454580514407, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 7147764517796332529, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7500051454580514407, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7500051454580514407, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7500051454580514407, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 7147764517796332529, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
@@ -6223,47 +6002,29 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8664609903398085411, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 8772036016955710174, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8664609903398085411, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 8772036016955710174, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMin.y
|
propertyPath: m_AnchorMin.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8664609903398085411, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 8772036016955710174, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8664609903398085411, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8664609903398085411, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8664609903398085411, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
- target: {fileID: 8772036016955710174, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects:
|
m_AddedGameObjects: []
|
||||||
- targetCorrespondingSourceObject: {fileID: 6018946838727076121, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
insertIndex: -1
|
|
||||||
addedObject: {fileID: 1959284015}
|
|
||||||
- targetCorrespondingSourceObject: {fileID: 5961383426537816645, guid: 11ac2a591441d5940b0b146f6dd3025e,
|
|
||||||
type: 3}
|
|
||||||
insertIndex: -1
|
|
||||||
addedObject: {fileID: 584576338}
|
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 11ac2a591441d5940b0b146f6dd3025e, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 11ac2a591441d5940b0b146f6dd3025e, type: 3}
|
||||||
--- !u!1001 &8688613702723117685
|
--- !u!1001 &8688613702723117685
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ public interface IGlobalConfigSystem : ISystem
|
|||||||
|
|
||||||
public void StopConnectionTime();
|
public void StopConnectionTime();
|
||||||
|
|
||||||
|
public string GetConnectionStartTime();
|
||||||
|
|
||||||
|
public void SetUserCount(int userCount);
|
||||||
|
public int GetUserCount();
|
||||||
|
|
||||||
public int GetConnectionTimeType();
|
public int GetConnectionTimeType();
|
||||||
public void SetConnectionTimeType(int connectionTimeType);
|
public void SetConnectionTimeType(int connectionTimeType);
|
||||||
|
|
||||||
@@ -45,6 +50,11 @@ public class GlobalConfigSystem : AbstractSystem, IGlobalConfigSystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private string _connectionName;
|
private string _connectionName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开始时间
|
||||||
|
/// </summary>
|
||||||
|
private string _connectionStartTime;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 连接时间
|
/// 连接时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -63,6 +73,11 @@ public class GlobalConfigSystem : AbstractSystem, IGlobalConfigSystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private string _userId;
|
private string _userId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 人数
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private int _userCount;
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
@@ -107,6 +122,7 @@ public class GlobalConfigSystem : AbstractSystem, IGlobalConfigSystem
|
|||||||
{
|
{
|
||||||
_cts = new CancellationTokenSource();
|
_cts = new CancellationTokenSource();
|
||||||
_connectionTime = 0;
|
_connectionTime = 0;
|
||||||
|
_connectionStartTime = System.DateTime.Now.ToString("HH:mm:ss");
|
||||||
while (!_cts.IsCancellationRequested)
|
while (!_cts.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
_connectionTime += Time.deltaTime;
|
_connectionTime += Time.deltaTime;
|
||||||
@@ -124,6 +140,28 @@ public class GlobalConfigSystem : AbstractSystem, IGlobalConfigSystem
|
|||||||
return $"{hours:D2}:{minutes:D2}:{seconds:D2}";
|
return $"{hours:D2}:{minutes:D2}:{seconds:D2}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetConnectionStartTime()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_connectionStartTime))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("GlobalConfigSystem: GetConnectionStartTime not set");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
return _connectionStartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetUserCount(int userCount)
|
||||||
|
{
|
||||||
|
_userCount = userCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetUserCount()
|
||||||
|
{
|
||||||
|
return _userCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void StopConnectionTime()
|
public void StopConnectionTime()
|
||||||
{
|
{
|
||||||
_cts?.Cancel();
|
_cts?.Cancel();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Script.Util;
|
||||||
using Stary.Evo;
|
using Stary.Evo;
|
||||||
using Stary.Evo.UIFarme;
|
using Stary.Evo.UIFarme;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -43,6 +44,8 @@ namespace Script
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private Text _roomPeopleNumText;
|
private Text _roomPeopleNumText;
|
||||||
|
|
||||||
|
private Transform _userGrid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 时间
|
/// 时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -57,6 +60,10 @@ namespace Script
|
|||||||
|
|
||||||
public override string UIPath => "Canvas";
|
public override string UIPath => "Canvas";
|
||||||
|
|
||||||
|
public Action<List<UsersItem>> OnUsersChangedEvnent;
|
||||||
|
|
||||||
|
private GameObjectPool _objectPool;
|
||||||
|
|
||||||
public override void Initialize(GameObject panelGo)
|
public override void Initialize(GameObject panelGo)
|
||||||
{
|
{
|
||||||
base.Initialize(panelGo);
|
base.Initialize(panelGo);
|
||||||
@@ -65,6 +72,8 @@ namespace Script
|
|||||||
_arrowLeft = panelGo.transform.Find("Header/arrow-left").GetComponent<Button>();
|
_arrowLeft = panelGo.transform.Find("Header/arrow-left").GetComponent<Button>();
|
||||||
_idText = panelGo.transform.Find("MeetingInfoCard/meeting/id").GetComponent<Text>();
|
_idText = panelGo.transform.Find("MeetingInfoCard/meeting/id").GetComponent<Text>();
|
||||||
_roomPeopleNumText = panelGo.transform.Find("MeetingInfoCard/numberOfPeople/number").GetComponent<Text>();
|
_roomPeopleNumText = panelGo.transform.Find("MeetingInfoCard/numberOfPeople/number").GetComponent<Text>();
|
||||||
|
_userGrid = panelGo.transform.Find("MeetingInfoCard/userGrid");
|
||||||
|
_objectPool = panelGo.transform.Find("MeetingInfoCard/pool").GetComponent<GameObjectPool>();
|
||||||
_chatTog = panelGo.transform.Find("Tabs/Chat").GetComponent<Toggle>();
|
_chatTog = panelGo.transform.Find("Tabs/Chat").GetComponent<Toggle>();
|
||||||
_contactsTog = panelGo.transform.Find("Tabs/Contacts").GetComponent<Toggle>();
|
_contactsTog = panelGo.transform.Find("Tabs/Contacts").GetComponent<Toggle>();
|
||||||
_meetingOrganizersTog = panelGo.transform.Find("Tabs/MeetingOrganizers").GetComponent<Toggle>();
|
_meetingOrganizersTog = panelGo.transform.Find("Tabs/MeetingOrganizers").GetComponent<Toggle>();
|
||||||
@@ -72,23 +81,25 @@ namespace Script
|
|||||||
_meetingContacts = new MeetingContacts();
|
_meetingContacts = new MeetingContacts();
|
||||||
_meetingContacts.Initialize(panelGo.transform.Find("MeetingContacts").gameObject);
|
_meetingContacts.Initialize(panelGo.transform.Find("MeetingContacts").gameObject);
|
||||||
_meetingInfoList = new MeetingInfoList();
|
_meetingInfoList = new MeetingInfoList();
|
||||||
_meetingInfoList.Initialize(panelGo.transform.Find("MeetingInfoList").gameObject);
|
_meetingInfoList.Initialize(panelGo.transform.Find("MeetingInfoList").gameObject, this);
|
||||||
_meetingChat = new MeetingChat();
|
_meetingChat = new MeetingChat();
|
||||||
_meetingChat.Initialize(panelGo.transform.Find("MeetingChat").gameObject);
|
_meetingChat.Initialize(panelGo.transform.Find("MeetingChat").gameObject, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEnter(Action complete = null)
|
public override void OnEnter(Action complete = null)
|
||||||
{
|
{
|
||||||
base.OnEnter(complete);
|
base.OnEnter(complete);
|
||||||
_meetingInfoList.OnEnter();
|
_meetingInfoList.OnEnter();
|
||||||
|
;
|
||||||
|
|
||||||
_titleText.text = this.GetSystem<IGlobalConfigSystem>().GetConnectionName();
|
_titleText.text = this.GetSystem<IGlobalConfigSystem>().GetConnectionName();
|
||||||
this.GetSystem<IGlobalConfigSystem>().StartConnectionTime(_timeText);
|
this.GetSystem<IGlobalConfigSystem>().StartConnectionTime(_timeText);
|
||||||
|
_idText.text = this.GetSystem<IGlobalConfigSystem>().GetConnectionId();
|
||||||
_arrowLeft.onClick.AddListener(OnArrowLeftClick);
|
_arrowLeft.onClick.AddListener(OnArrowLeftClick);
|
||||||
_chatTog.onValueChanged.AddListener(OnChatTog);
|
_chatTog.onValueChanged.AddListener(OnChatTog);
|
||||||
_contactsTog.onValueChanged.AddListener(OnContactsTog);
|
_contactsTog.onValueChanged.AddListener(OnContactsTog);
|
||||||
_meetingOrganizersTog.onValueChanged.AddListener(OnMeetingOrganizersTog);
|
_meetingOrganizersTog.onValueChanged.AddListener(OnMeetingOrganizersTog);
|
||||||
|
OnUsersChangedEvnent += OnUsersChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -97,10 +108,28 @@ namespace Script
|
|||||||
base.OnExit(delay);
|
base.OnExit(delay);
|
||||||
_meetingContacts.OnExit();
|
_meetingContacts.OnExit();
|
||||||
_meetingInfoList.OnExit();
|
_meetingInfoList.OnExit();
|
||||||
|
_meetingChat.OnExit();
|
||||||
_arrowLeft.onClick.RemoveListener(OnArrowLeftClick);
|
_arrowLeft.onClick.RemoveListener(OnArrowLeftClick);
|
||||||
_chatTog.onValueChanged.RemoveListener(OnChatTog);
|
_chatTog.onValueChanged.RemoveListener(OnChatTog);
|
||||||
_contactsTog.onValueChanged.RemoveListener(OnContactsTog);
|
_contactsTog.onValueChanged.RemoveListener(OnContactsTog);
|
||||||
_meetingOrganizersTog.onValueChanged.RemoveListener(OnMeetingOrganizersTog);
|
_meetingOrganizersTog.onValueChanged.RemoveListener(OnMeetingOrganizersTog);
|
||||||
|
OnUsersChangedEvnent += OnUsersChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnUsersChanged(List<UsersItem> obj)
|
||||||
|
{
|
||||||
|
for (var i = 0; i < _objectPool.transform.childCount; i++)
|
||||||
|
_objectPool.Release(_objectPool.transform.GetChild(i).gameObject);
|
||||||
|
_roomPeopleNumText.text = obj.Count.ToString();
|
||||||
|
for (var i = 0; i < obj.Count; i++)
|
||||||
|
{
|
||||||
|
var entry = _objectPool.Get();
|
||||||
|
await WebRTCUtil.DownloadAndSetAvatar(obj[i].avatar,
|
||||||
|
entry.transform.Find("image").GetComponent<Image>());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新会议聊天面板人数
|
||||||
|
_meetingChat.OnUserCountChangedEvent?.Invoke(obj.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMeetingOrganizersTog(bool value)
|
private void OnMeetingOrganizersTog(bool value)
|
||||||
@@ -117,6 +146,7 @@ namespace Script
|
|||||||
private void OnChatTog(bool value)
|
private void OnChatTog(bool value)
|
||||||
{
|
{
|
||||||
_meetingChat.PanelGo.SetActive(value);
|
_meetingChat.PanelGo.SetActive(value);
|
||||||
|
if (value) _meetingChat.OnEnter();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnArrowLeftClick()
|
private void OnArrowLeftClick()
|
||||||
|
|||||||
@@ -1,24 +1,105 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using RenderStreaming;
|
using RenderStreaming;
|
||||||
|
using Script.Util;
|
||||||
using Stary.Evo;
|
using Stary.Evo;
|
||||||
|
using Unity.RenderStreaming;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace Script
|
namespace Script
|
||||||
{
|
{
|
||||||
public class MeetingChat : IController
|
public class MeetingChat : IController
|
||||||
{
|
{
|
||||||
public GameObject PanelGo;
|
public GameObject PanelGo;
|
||||||
|
private MainPanel _mainPanel;
|
||||||
|
|
||||||
public void Initialize(GameObject panelGo)
|
private Transform _content;
|
||||||
|
private GameObjectPool _objectRightPool;
|
||||||
|
private GameObjectPool _objectLeftPool;
|
||||||
|
|
||||||
|
|
||||||
|
private Text _connectionTimeText;
|
||||||
|
private Text _userCountText;
|
||||||
|
|
||||||
|
public Action<int> OnUserCountChangedEvent;
|
||||||
|
|
||||||
|
private List<ChatData> _chatDatas = new();
|
||||||
|
|
||||||
|
public void Initialize(GameObject panelGo, MainPanel mainPanel)
|
||||||
{
|
{
|
||||||
PanelGo = panelGo;
|
PanelGo = panelGo;
|
||||||
|
_mainPanel = mainPanel;
|
||||||
|
_content = panelGo.transform.Find("MeetingGrid/Viewport/Content");
|
||||||
|
_objectRightPool = panelGo.transform.Find("MeetingGrid/LeftPool").GetComponent<GameObjectPool>();
|
||||||
|
_objectLeftPool = panelGo.transform.Find("MeetingGrid/RightPool").GetComponent<GameObjectPool>();
|
||||||
|
|
||||||
|
_connectionTimeText = panelGo.transform.Find("MeetingNum/Time").GetComponent<Text>();
|
||||||
|
_connectionTimeText.text = this.GetSystem<IGlobalConfigSystem>().GetConnectionStartTime();
|
||||||
|
|
||||||
|
_userCountText = panelGo.transform.Find("MeetingNum/Num").GetComponent<Text>();
|
||||||
|
_userCountText.text = this.GetSystem<IGlobalConfigSystem>().GetUserCount().ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void OnEnter()
|
public async void OnEnter()
|
||||||
{
|
{
|
||||||
|
OnUserCountChangedEvent += OnUserCountChanged;
|
||||||
|
GameObject.FindObjectOfType<MessageChannel>().OnChatMessageReceived += OnChatMessageReceivedEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void OnExit()
|
public async void OnExit()
|
||||||
{
|
{
|
||||||
|
OnUserCountChangedEvent -= OnUserCountChanged;
|
||||||
|
GameObject.FindObjectOfType<MessageChannel>().OnChatMessageReceived -= OnChatMessageReceivedEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnChatMessageReceivedEvent(string connectionId, ChatData data)
|
||||||
|
{
|
||||||
|
if (connectionId != this.GetSystem<IGlobalConfigSystem>().GetConnectionId()) return;
|
||||||
|
_chatDatas.Add(data);
|
||||||
|
if (bool.Parse(data.isSelf) == false)
|
||||||
|
{
|
||||||
|
var entry = _objectLeftPool.Get();
|
||||||
|
SetMessageEntry(data, entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetMessageEntry(ChatData data, GameObject entry)
|
||||||
|
{
|
||||||
|
var head = entry.transform.Find("head");
|
||||||
|
var name = entry.transform.Find("name");
|
||||||
|
var message = entry.transform.Find("message");
|
||||||
|
var sprite = entry.transform.Find("sprite");
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(data.senderAvatar))
|
||||||
|
{
|
||||||
|
var randomColor = WebRTCUtil.GetRandomColor();
|
||||||
|
head.GetComponent<Image>().color = randomColor;
|
||||||
|
head.transform.Find("Name").GetComponent<Text>().text = data.senderName.Substring(0, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WebRTCUtil.DownloadAndSetAvatar(data.senderAvatar, head.GetComponent<Image>());
|
||||||
|
}
|
||||||
|
|
||||||
|
name.GetComponent<Text>().text = data.senderName;
|
||||||
|
|
||||||
|
if (data.type == "text")
|
||||||
|
{
|
||||||
|
message.GetComponent<Text>().text = data.content;
|
||||||
|
sprite.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
else if (data.type == "image")
|
||||||
|
{
|
||||||
|
message.gameObject.SetActive(false);
|
||||||
|
sprite.gameObject.SetActive(true);
|
||||||
|
//TODO 图片传输功能
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnUserCountChanged(int obj)
|
||||||
|
{
|
||||||
|
_userCountText.text = obj.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IArchitecture GetArchitecture()
|
public IArchitecture GetArchitecture()
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace Script
|
|||||||
{
|
{
|
||||||
public class MeetingInfoList : IController
|
public class MeetingInfoList : IController
|
||||||
{
|
{
|
||||||
|
private MainPanel _mainPanel;
|
||||||
public GameObject PanelGo;
|
public GameObject PanelGo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -28,9 +29,10 @@ namespace Script
|
|||||||
|
|
||||||
private GameObjectPool _objectPool;
|
private GameObjectPool _objectPool;
|
||||||
|
|
||||||
public void Initialize(GameObject panelGo)
|
public void Initialize(GameObject panelGo, MainPanel mainPanel)
|
||||||
{
|
{
|
||||||
PanelGo = panelGo;
|
PanelGo = panelGo;
|
||||||
|
_mainPanel = mainPanel;
|
||||||
_contactEntryPrefab = Resources.Load<GameObject>("ParticipantEntry");
|
_contactEntryPrefab = Resources.Load<GameObject>("ParticipantEntry");
|
||||||
_content = panelGo.transform.Find("MeetingGrid/Viewport/Content");
|
_content = panelGo.transform.Find("MeetingGrid/Viewport/Content");
|
||||||
_meetingNum = panelGo.transform.Find("MeetingNum/Num").GetComponent<Text>();
|
_meetingNum = panelGo.transform.Find("MeetingNum/Num").GetComponent<Text>();
|
||||||
@@ -103,6 +105,8 @@ namespace Script
|
|||||||
$"/signaling/users?connectionId={this.GetSystem<IGlobalConfigSystem>().GetConnectionId()}");
|
$"/signaling/users?connectionId={this.GetSystem<IGlobalConfigSystem>().GetConnectionId()}");
|
||||||
if (response != null && response.totalCount > 0)
|
if (response != null && response.totalCount > 0)
|
||||||
{
|
{
|
||||||
|
this.GetSystem<IGlobalConfigSystem>().SetUserCount(response.totalCount);
|
||||||
|
_mainPanel.OnUsersChangedEvnent?.Invoke(response.users);
|
||||||
_meetingNum.text = response.totalCount.ToString();
|
_meetingNum.text = response.totalCount.ToString();
|
||||||
for (var i = 0; i < response.totalCount; i++)
|
for (var i = 0; i < response.totalCount; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
using Stary.Evo;
|
using Stary.Evo;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
@@ -9,6 +11,8 @@ namespace Script.Util
|
|||||||
{
|
{
|
||||||
public static class WebRTCUtil
|
public static class WebRTCUtil
|
||||||
{
|
{
|
||||||
|
public static Dictionary<string, Sprite> _avatarCache = new();
|
||||||
|
|
||||||
public static Color GetRandomColor()
|
public static Color GetRandomColor()
|
||||||
{
|
{
|
||||||
return new Color(
|
return new Color(
|
||||||
@@ -19,10 +23,16 @@ namespace Script.Util
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async void DownloadAndSetAvatar(string avatarUrl, Image targetImage)
|
public static async UniTask DownloadAndSetAvatar(string avatarUrl, Image targetImage)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (_avatarCache.TryGetValue(avatarUrl, out var sprite))
|
||||||
|
{
|
||||||
|
targetImage.sprite = sprite;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var tempPath = Path.Combine(Application.temporaryCachePath, $"avatar_{Guid.NewGuid()}.png");
|
var tempPath = Path.Combine(Application.temporaryCachePath, $"avatar_{Guid.NewGuid()}.png");
|
||||||
var result = await WebRequestSystem.GetFile(avatarUrl, tempPath);
|
var result = await WebRequestSystem.GetFile(avatarUrl, tempPath);
|
||||||
|
|
||||||
@@ -32,11 +42,12 @@ namespace Script.Util
|
|||||||
var texture = new Texture2D(2, 2);
|
var texture = new Texture2D(2, 2);
|
||||||
texture.LoadImage(bytes);
|
texture.LoadImage(bytes);
|
||||||
|
|
||||||
var sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height),
|
sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height),
|
||||||
Vector2.one * 0.5f);
|
Vector2.one * 0.5f);
|
||||||
targetImage.sprite = sprite;
|
targetImage.sprite = sprite;
|
||||||
|
|
||||||
File.Delete(tempPath);
|
File.Delete(tempPath);
|
||||||
|
_avatarCache.TryAdd(avatarUrl, sprite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ namespace Unity.RenderStreaming
|
|||||||
|
|
||||||
public event Action<string, UserInfo> OnUserInfoMessageReceived;
|
public event Action<string, UserInfo> OnUserInfoMessageReceived;
|
||||||
public event Action<string, MediaStateChange> OnMediaStateChangeReceived;
|
public event Action<string, MediaStateChange> OnMediaStateChangeReceived;
|
||||||
|
public event Action<string, ChatData> OnChatMessageReceived;
|
||||||
|
|
||||||
|
|
||||||
public override void OnMessage(string message)
|
public override void OnMessage(string message)
|
||||||
@@ -44,7 +45,9 @@ namespace Unity.RenderStreaming
|
|||||||
switch (record.type)
|
switch (record.type)
|
||||||
{
|
{
|
||||||
case MessageTypes.Chat:
|
case MessageTypes.Chat:
|
||||||
var chat = record.data as ChatData;
|
var chat = record.data as JObject;
|
||||||
|
var chatData = chat.ToObject<ChatData>();
|
||||||
|
OnChatMessageReceived?.Invoke(ConnectionId, chatData);
|
||||||
break;
|
break;
|
||||||
case MessageTypes.UserInfo:
|
case MessageTypes.UserInfo:
|
||||||
json = record.data as JObject;
|
json = record.data as JObject;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Unity.RenderStreaming
|
|||||||
{
|
{
|
||||||
public static class MessageTypes
|
public static class MessageTypes
|
||||||
{
|
{
|
||||||
public const string Chat = "chat";
|
public const string Chat = "chat-message";
|
||||||
public const string UserInfo = "user-info";
|
public const string UserInfo = "user-info";
|
||||||
public const string MediaStateChange = "media-state-changed";
|
public const string MediaStateChange = "media-state-changed";
|
||||||
public const string ParticipantsSync = "participants-sync";
|
public const string ParticipantsSync = "participants-sync";
|
||||||
@@ -18,10 +18,14 @@ namespace Unity.RenderStreaming
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class ChatData
|
public class ChatData
|
||||||
{
|
{
|
||||||
|
public string id;
|
||||||
public string senderId;
|
public string senderId;
|
||||||
public string senderName;
|
public string senderName;
|
||||||
|
public string senderAvatar;
|
||||||
public string content;
|
public string content;
|
||||||
public long timestamp;
|
public string type;
|
||||||
|
public string timestamp;
|
||||||
|
public string isSelf;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|||||||
Reference in New Issue
Block a user