Browse Source

修改高度 、 重置按钮

DGJ 1 year ago
parent
commit
07f7808523

+ 4 - 3
Assets/MediaSoup/RemoteRtc.cs

@@ -43,9 +43,9 @@ public class RemoteRtc : SCRtcManager
                 break;
             case "Nreal":
 #if !UNITY_EDITOR
-                NRKernal.NRRGBCamTexture RGBCamTexture = new NRKernal.NRRGBCamTexture();
-                meshRender.material.mainTexture = RGBCamTexture.GetTexture();
-                RGBCamTexture.Play();
+                //NRKernal.NRRGBCamTexture RGBCamTexture = new NRKernal.NRRGBCamTexture();
+                //meshRender.material.mainTexture = RGBCamTexture.GetTexture();
+                //RGBCamTexture.Play();
 #endif
                 meshRender.transform.localEulerAngles = new Vector3(180, 0, 0);
 
@@ -56,6 +56,7 @@ public class RemoteRtc : SCRtcManager
             case "Rhinox":
 #if !UNITY_EDITOR
                 StartCoroutine(CallCamera(2));
+                 meshRender.transform.localEulerAngles = new Vector3(180, 0, 0);
 #elif UNITY_EDITOR
                 StartCoroutine(CallCamera());
 #endif

+ 20 - 9
Assets/Remote/Scenes/Remote3.0.unity

@@ -256,6 +256,21 @@ PrefabInstance:
   m_Modification:
     m_TransformParent: {fileID: 0}
     m_Modifications:
+    - target: {fileID: 604547950963967446, guid: 1f19c6a2eb9f83340a868c4c9fd2d104,
+        type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 604547950963967446, guid: 1f19c6a2eb9f83340a868c4c9fd2d104,
+        type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 604547950963967446, guid: 1f19c6a2eb9f83340a868c4c9fd2d104,
+        type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 180
+      objectReference: {fileID: 0}
     - target: {fileID: 604547952246451192, guid: 1f19c6a2eb9f83340a868c4c9fd2d104,
         type: 3}
       propertyPath: cam2
@@ -706,20 +721,12 @@ MonoBehaviour:
   _appID: 
   _token: 
   _channelName: 
-  isAudio: 0
-  isVideo: 0
   LogText: {fileID: 1080824326}
-  isRoom: 0
   uid: 0
   userAccount: 
   isSwitchCamera: 0
-  mainViewPeerId: 
-  isSendVideo: 0
-  screenShot: {fileID: 0}
   ca: {fileID: 284870648}
   img: {fileID: 948814504}
-  bts: []
-  flipTexture: {fileID: 0}
 --- !u!1 &918637851
 GameObject:
   m_ObjectHideFlags: 0
@@ -1595,7 +1602,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 948b9ab040508dc48a294230f85b39e2, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  canvas: {fileID: 0}
 --- !u!1 &973110132107938475
 GameObject:
   m_ObjectHideFlags: 0
@@ -1809,6 +1815,11 @@ PrefabInstance:
       propertyPath: isHand
       value: 0
       objectReference: {fileID: 0}
+    - target: {fileID: 6007065485426162334, guid: 7cd0ceba7525bdc42a36be841a8aad16,
+        type: 3}
+      propertyPath: m_LocalPosition.y
+      value: -1
+      objectReference: {fileID: 0}
     - target: {fileID: 8475401995549084109, guid: 7cd0ceba7525bdc42a36be841a8aad16,
         type: 3}
       propertyPath: m_RootOrder

+ 22 - 4
Assets/Remote/ShowRoom/ShowRoom.cs

@@ -29,6 +29,12 @@ public class ShowRoom : RemoteSingleton<ShowRoom>
         {
             showMainScreenBtn.onClick.AddListener(ShowMainScreen);
         }
+
+        if (ResetVideoPanal.DifferencePosition == Vector3.zero)
+        {
+            Vector3 vthis = transform.position;
+            ResetVideoPanal.DifferencePosition = new Vector3(vthis.x, vthis.y, vthis.z);
+        }
     }
 
     private void Refuse(JsonData data)
@@ -115,13 +121,13 @@ public class ShowRoom : RemoteSingleton<ShowRoom>
     {
         if (PopPeerView.Instance && PopPublic.Instance && PopPeerView.Instance.list.parent != PopPublic.Instance.transform)
         {
-            PopPeerView.Instance.list.position = new Vector3(0, 0, 0);
+            PopPeerView.Instance.list.position = new Vector3(0, 0.9f, 0);
             PopPeerView.Instance.list.eulerAngles = new Vector3(0, 0, 0);
             PopPeerView.Instance.list.SetParent(PopPublic.Instance.transform);
         }
         if (PopUpInfo.Instance && PopPublic.Instance && PopUpInfo.Instance.transform.parent != PopPublic.Instance.transform)
         {
-            PopUpInfo.Instance.transform.position = new Vector3(0, 0, 0);
+            PopUpInfo.Instance.transform.position = new Vector3(0, 0.9f, 0);
             PopUpInfo.Instance.transform.eulerAngles = new Vector3(0, 0, 0);
             PopUpInfo.Instance.transform.SetParent(PopPublic.Instance.transform);
         }
@@ -154,7 +160,7 @@ public class ShowRoom : RemoteSingleton<ShowRoom>
         {
             PopCall.Instance.gameObject.SetActive(false);
         }
-        transform.position = new Vector3(0, 0, 0);
+        transform.position = new Vector3(0, 0.9f, 0);
         transform.eulerAngles = new Vector3(0, 0, 0);
         if (GameStart.Instance && GameStart.Instance.systemMenu)
         {
@@ -227,7 +233,7 @@ public class ShowRoom : RemoteSingleton<ShowRoom>
         {
             PrintscreenList.Instance.DeleteAll();
         }
-        transform.position = new Vector3(-0.2f, 0, 0);
+        transform.position = new Vector3(-0.2f, 0.9f, 0);
         transform.eulerAngles = new Vector3(0, -30, 0);
         ShowMainScreen();
         PopPeerView.CloseView?.Invoke();
@@ -241,4 +247,16 @@ public class ShowRoom : RemoteSingleton<ShowRoom>
             RoomInfo.Instance.ResetChatText();
         }
     }
+
+    public void ResetPosition()
+    {
+        if(transform.GetChild(0).gameObject.activeSelf)  ShowMainScreen();
+
+        //Debug.LogError("开始设置位置");
+        // 视频面板-SDK(0)=差,视频面板=SDK+差
+        // 第一次获取SDKSystem与视频面板的位置,并记录,点击重置按钮设置位置
+        Vector3 vSDKSystem = Camera.main.transform.position;
+        vSDKSystem.y -= 1; // 遂光比较特殊,其他版本不需要
+        transform.position= new Vector3(vSDKSystem.x+ ResetVideoPanal.DifferencePosition.x, vSDKSystem.y+ ResetVideoPanal.DifferencePosition.y, vSDKSystem.z+ ResetVideoPanal.DifferencePosition.z);
+    }
 }

+ 7 - 1
Assets/Remote/Z_Blend/SystemFollow.cs

@@ -61,11 +61,17 @@ public class SystemFollow : MonoBehaviour {
 
     public void ToResetSlam()
     {
+        /*
         API_GSXR_Slam.GSXR_Reset_Slam();
 		if (ShowRoom.Instance.gameObject.activeSelf)
 		{
 			ShowRoom.Instance.Reset();
-		}
+        }
+		*/
+        if (ShowRoom.Instance.gameObject.activeSelf)
+        {
+            ShowRoom.Instance.ResetPosition();
+        }
     }
 
 	public void Swith3DOf()

+ 6 - 0
Assets/Scripts/ResetVideoPanal.cs

@@ -0,0 +1,6 @@
+using UnityEngine;
+
+public static class ResetVideoPanal
+{
+    public static Vector3 DifferencePosition;
+}

+ 11 - 0
Assets/Scripts/ResetVideoPanal.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dae3de5f16759f6488d70afe8a78ce04
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 2
Assets/XR/XRGeneralSettings.asset

@@ -15,7 +15,8 @@ MonoBehaviour:
   m_RequiresSettingsUpdate: 0
   m_AutomaticLoading: 0
   m_AutomaticRunning: 0
-  m_Loaders: []
+  m_Loaders:
+  - {fileID: 11400000, guid: ea6b4fa5606b423479ad49b5a843cefe, type: 2}
 --- !u!114 &11400000
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -44,4 +45,4 @@ MonoBehaviour:
   m_Name: Android Settings
   m_EditorClassIdentifier: 
   m_LoaderManagerInstance: {fileID: -968004925683208553}
-  m_InitManagerOnStart: 0
+  m_InitManagerOnStart: 1

+ 0 - 6
GHZMRSupportXR.sln

@@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ximmerse.XR.Editor", "Ximme
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{736ECCAF-2531-9FBD-9F84-A835CA4E04DE}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demos.StandardShader.Inspectors", "Demos.StandardShader.Inspectors.csproj", "{0105670B-211E-72A6-4A0A-81D14515DB44}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AVProVideo.Editor", "AVProVideo.Editor.csproj", "{C37AE3D2-A06E-5EDF-634B-BE39388BD855}"
 EndProject
 Global
@@ -47,10 +45,6 @@ Global
 		{736ECCAF-2531-9FBD-9F84-A835CA4E04DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{736ECCAF-2531-9FBD-9F84-A835CA4E04DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{736ECCAF-2531-9FBD-9F84-A835CA4E04DE}.Release|Any CPU.Build.0 = Release|Any CPU
-		{0105670B-211E-72A6-4A0A-81D14515DB44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{0105670B-211E-72A6-4A0A-81D14515DB44}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{0105670B-211E-72A6-4A0A-81D14515DB44}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{0105670B-211E-72A6-4A0A-81D14515DB44}.Release|Any CPU.Build.0 = Release|Any CPU
 		{C37AE3D2-A06E-5EDF-634B-BE39388BD855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C37AE3D2-A06E-5EDF-634B-BE39388BD855}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C37AE3D2-A06E-5EDF-634B-BE39388BD855}.Release|Any CPU.ActiveCfg = Release|Any CPU

+ 4 - 2
ProjectSettings/ProjectSettings.asset

@@ -146,7 +146,9 @@ PlayerSettings:
     16:9: 1
     Others: 1
   bundleVersion: 2.5.0
-  preloadedAssets: []
+  preloadedAssets:
+  - {fileID: 799516907108274431, guid: bc82c4904d3145f42acc37a970fdc037, type: 2}
+  - {fileID: 1707767742241832562, guid: 1a1d14ff6628c11499dfd78d30397967, type: 2}
   metroInputSource: 0
   wsaTransparentSwapchain: 0
   m_HolographicPauseOnTrackingLoss: 1
@@ -500,7 +502,7 @@ PlayerSettings:
   openGLRequireES32: 0
   m_TemplateCustomTags: {}
   mobileMTRendering:
-    Android: 1
+    Android: 0
     iPhone: 1
     tvOS: 1
   m_BuildTargetGroupLightmapEncodingQuality:

+ 3 - 2
ProjectSettings/QualitySettings.asset

@@ -93,7 +93,7 @@ QualitySettings:
     skinWeights: 2
     textureQuality: 0
     anisotropicTextures: 2
-    antiAliasing: 0
+    antiAliasing: 4
     softParticles: 0
     softVegetation: 0
     realtimeReflectionProbes: 0
@@ -223,13 +223,14 @@ QualitySettings:
     customRenderPipeline: {fileID: 0}
     excludedTargetPlatforms: []
   m_PerPlatformDefaultQuality:
-    Android: 2
+    Android: 5
     Nintendo 3DS: 5
     Nintendo Switch: 5
     PS4: 5
     PSM: 5
     PSP2: 2
     Samsung TV: 2
+    Server: 0
     Standalone: 5
     Tizen: 2
     Web: 5