Browse Source

Merge branch 'F/20231026_RTCChange' of https://gogs.ghz-tech.com:8843/GHzGlass/GHZLangChao into F/20231026_RTCChange

胡佳骏 1 year ago
parent
commit
78d8d0a9df

+ 3 - 1
Assets/Game/ShowLogin/LangChaoLogin.cs

@@ -54,7 +54,7 @@ namespace GHZLangChao
         private void OnClickLogin()
         {
 #if UNITY_EDITOR
-            mAccountStr = "cy1";
+            mAccountStr = "dgj1";
             mPasswordStr = "1";
             mAccount_Input.text = mAccountStr;
             mPassword_Input.text = mPasswordStr;
@@ -88,6 +88,8 @@ namespace GHZLangChao
                     MQTTManager.Instance.SetAccoutInfo(mAccountStr);
                    
                     GameStart.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpActionLang.userinfo, "", UserInfoCallBack));
+
+                    HttpTool.Instance.Post(HttpActionLang.sceneInit, "",MachineRoomManager.Instance.SceneInitCallBack);
                 }
                 else
                     StartCoroutine(PopUp());

+ 6 - 4
Assets/LangChaoRTC/Remote/ShowRoom/RoomFile.cs

@@ -38,11 +38,11 @@ public class RoomFile : RemoteSingleton<RoomFile>
     public override void Awake()
     {
         base.Awake();
-        WSHandler.Rtc.OnReceiveFile += ReceiveFile;
+      //  WSHandler.Rtc.OnReceiveFile += ReceiveFile;
         UpdataCountAction += OnUpdataCount;
-        WSHandler.Rtc.OnClearFile += ClearFile;
-        WSHandler.Rtc.OnCoordinate += Coordinate;
-        WSHandler.Rtc.OnSharePrintscreen += ReceiveSharePrintscreen;
+        //WSHandler.Rtc.OnClearFile += ClearFile;
+        //WSHandler.Rtc.OnCoordinate += Coordinate;
+        //WSHandler.Rtc.OnSharePrintscreen += ReceiveSharePrintscreen;
 
         MQTTClient.Instance.OnCoordinate += Coordinate;
     }
@@ -68,6 +68,8 @@ public class RoomFile : RemoteSingleton<RoomFile>
         clearAllBtn.onClick.AddListener(ClickOnClearAllBtn);
         ClearAllfileAction += ClearAllfile;
         WSHandler.Rtc.OnClearFileSucess += ClearFileSucess;
+
+       
     }
 
     private void ReceiveFile(JsonData data)

+ 2 - 2
Assets/LangChaoRTC/Remote/ShowRoom/RoomFile.prefab

@@ -1573,7 +1573,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 5295285540247215454, guid: a5c61b9b0b4aa184cbc1f6ef6eb326fe, type: 3}
       propertyPath: m_AnchoredPosition.x
-      value: 138.455
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 5295285540247215454, guid: a5c61b9b0b4aa184cbc1f6ef6eb326fe, type: 3}
       propertyPath: m_AnchoredPosition.y
@@ -1649,7 +1649,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 5295285540490895475, guid: a5c61b9b0b4aa184cbc1f6ef6eb326fe, type: 3}
       propertyPath: m_AnchoredPosition.x
-      value: 5
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 5295285540490895475, guid: a5c61b9b0b4aa184cbc1f6ef6eb326fe, type: 3}
       propertyPath: m_AnchoredPosition.y

+ 1 - 0
Assets/LangChaoRTC/Remote/ShowRoom/RoomMain.prefab

@@ -2978,6 +2978,7 @@ MonoBehaviour:
   noBtn: {fileID: 5065886541357084531}
   yesBtn: {fileID: 2022728989431233393}
   rtcRawImage: {fileID: 83380101878762281}
+  dragBtn: {fileID: 7453155672500104469}
 --- !u!1 &2241088652691173817
 GameObject:
   m_ObjectHideFlags: 0

+ 2 - 2
Assets/Scripts/Managers/MachineRoomManager.cs

@@ -229,7 +229,7 @@ public class MachineRoomManager : MonoSingleton<MachineRoomManager>
     private void Start()
     {
         Init();
-        HttpTool.Instance.Post(HttpActionLang.sceneInit, "", SceneInitCallBack);
+      
         //Init();
 
       
@@ -242,7 +242,7 @@ public class MachineRoomManager : MonoSingleton<MachineRoomManager>
 
 
 
-    private void SceneInitCallBack(string msg)
+    public void SceneInitCallBack(string msg)
     {
         Debug.Log(msg);
 

+ 3 - 0
Assets/Scripts/RTC/LiveRTCRoomMain.cs

@@ -1,4 +1,5 @@
 using Blue;
+using SC.XR.Unity.Module_InputSystem;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
@@ -20,10 +21,12 @@ public class LiveRTCRoomMain : MonoSingleton<LiveRTCRoomMain>,IController
 
     public RawImage rtcRawImage;
 
+    public ManipulationHandler dragBtn;
    
     private void Start()
     {
         OnInit();
+        dragBtn.Target = transform.parent;
     }
 
     private void Update()

+ 1 - 1
Packages/manifest.json

@@ -1,7 +1,6 @@
 {
   "dependencies": {
     "com.cysharp.unitask": "https://gogs.ghz-tech.com:8843/GHzGlass/UniTaskXR.git",
-    "com.unity.webrtc": "https://gogs.ghz-tech.com:8843/GHzGlass/WebRtcXR.git",
     "com.ghz.avideoplayer": "https://gogs.ghz-tech.com:8843/GHzGlass/VideoPlayerXR.git#EasyMovieTexture",
     "com.ghz.login": "https://gogs.ghz-tech.com:8843/GHzGlass/LoginXR.git",
     "com.ghz.mqtt": "https://gogs.ghz-tech.com:8843/GHzGlass/GHZMQTTXR.git",
@@ -16,6 +15,7 @@
     "com.unity.timeline": "1.6.4",
     "com.unity.ugui": "1.0.0",
     "com.unity.visualscripting": "1.7.8",
+    "com.unity.webrtc": "3.0.0-pre.7",
     "com.unity.xr.arcore": "4.2.8",
     "com.unity.xr.arfoundation": "4.2.8",
     "com.unity.xr.openxr": "1.5.3",