Browse Source

Merge branch 'F/0710_2.1+2.0' of https://gogs.ghz-tech.com:8843/GHzGlass/GHZMRNavigatorProXR into F/0710_2.1+2.0

胡佳骏 1 year ago
parent
commit
c14403297c

+ 1 - 1
Assets/2.0/User/UserScene/UserSceneUI.cs

@@ -19,7 +19,7 @@ public class UserSceneUI : UserBaseUI<UserSceneUI>
 
    public void LoadResources()
     {
-        //¼ÓÔØÔ¤ÖÆÌå
+        //加载预制体
         Debug.Log("UI   LoadResources===>");
         // GameScene.Instance.gotoScenes("147");
         obj = GameObject.Instantiate(Resources.Load<GameObject>("UI/SceneChoose2"));

+ 86 - 0
Assets/Prefab/Material/UIShader 1.mat

@@ -0,0 +1,86 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!21 &2100000
+Material:
+  serializedVersion: 8
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: UIShader 1
+  m_Shader: {fileID: 4800000, guid: 279a60f504778ea478306c228b8e0384, type: 3}
+  m_ValidKeywords: []
+  m_InvalidKeywords: []
+  m_LightmapFlags: 4
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: 3000
+  stringTagMap: {}
+  disabledShaderPasses: []
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _BumpMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailAlbedoMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailMask:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailNormalMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _EmissionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MainTex:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MetallicGlossMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _OcclusionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _ParallaxMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    m_Ints: []
+    m_Floats:
+    - _BumpScale: 1
+    - _ColorMask: 15
+    - _Cutoff: 0.5
+    - _DetailNormalMapScale: 1
+    - _DstBlend: 0
+    - _GlossMapScale: 1
+    - _Glossiness: 0.5
+    - _GlossyReflections: 1
+    - _Metallic: 0
+    - _Mode: 0
+    - _OcclusionStrength: 1
+    - _Parallax: 0.02
+    - _SmoothnessTextureChannel: 0
+    - _SpecularHighlights: 1
+    - _SrcBlend: 1
+    - _Stencil: 0
+    - _StencilComp: 8
+    - _StencilOp: 0
+    - _StencilReadMask: 255
+    - _StencilWriteMask: 255
+    - _UVSec: 0
+    - _ZWrite: 1
+    m_Colors:
+    - _Color: {r: 1, g: 1, b: 1, a: 1}
+    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
+  m_BuildTextureStacks: []

+ 8 - 0
Assets/Prefab/Material/UIShader 1.mat.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 107e6b4827caf444c8e9f1aeea63ee5e
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 2100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 5 - 5
Assets/Resources/MinMapCanvas.prefab

@@ -417,14 +417,14 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 3134174763056334269}
-  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalRotation: {x: 0, y: 0.01745245, z: 0, w: 0.99984777}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 3134174761955952036}
   m_RootOrder: 1
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_LocalEulerAnglesHint: {x: 0, y: 2, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
   m_AnchoredPosition: {x: 159.97314, y: -67.50488}
@@ -450,7 +450,7 @@ LineRenderer:
   m_RenderingLayerMask: 1
   m_RendererPriority: 0
   m_Materials:
-  - {fileID: 2100000, guid: 8a0eabc01a1edbb4983f852497db48f6, type: 2}
+  - {fileID: 2100000, guid: 107e6b4827caf444c8e9f1aeea63ee5e, type: 2}
   m_StaticBatchInfo:
     firstSubMesh: 0
     subMeshCount: 0
@@ -641,7 +641,7 @@ RectTransform:
   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: 159.97314, y: -67.50488}
+  m_AnchoredPosition: {x: 215, y: -67.50488}
   m_SizeDelta: {x: 15, y: 15}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3134174763366154730
@@ -664,7 +664,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  m_Material: {fileID: 2100000, guid: 8a0eabc01a1edbb4983f852497db48f6, type: 2}
+  m_Material: {fileID: 2100000, guid: 107e6b4827caf444c8e9f1aeea63ee5e, type: 2}
   m_Color: {r: 0, g: 0.7265, b: 1, a: 1}
   m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}

File diff suppressed because it is too large
+ 558 - 360
Assets/Resources/UI/SceneChoose2.prefab


+ 5 - 0
Assets/Script/UserChooseScene.cs

@@ -46,4 +46,9 @@ public class UserChooseScene : MonoBehaviour
         }
         DownloadResManager.Instance.StartDownLoad();
     }
+
+  public void CloseCS()
+    {
+        cs.SetActive(false);
+    }
 }

+ 34 - 4
Assets/Script/UserChooseSceneItem.cs

@@ -7,18 +7,48 @@ public class UserChooseSceneItem : MonoBehaviour
 {
     public Toggle tg;
 
-    //³¡¾°ID
+    //场景ID
     public string id;
     public Text itemName;
+
+    public Mask mask;
+
+    public Camera xrCamera;
+    public GameObject model;
+    public Button gotoSceneBtn;
+    private RectTransform rectTransform;
+
     // Start is called before the first frame update
     void Start()
     {
-        
-    }
+        xrCamera = OpenXRCamera.Instance.GetComponent<Camera>();
+        rectTransform = GetComponent<RectTransform>();
 
+        gotoSceneBtn.onClick.AddListener(() => {
+            GameManager.Instance.isShowDownTip = true;
+            UIManager.Instance.ShowUI(UINameConfig.LoadingPanel, typeof(LoadingPanel), (int)ELoadState.download);
+            GameScene.Instance.gotoScenes(id);
+            DownloadResManager.Instance.StartDownLoad();
+        });
+    }
+    
     // Update is called once per frame
     void Update()
     {
-        
+        if(mask)
+        {
+
+            //if(mask.IsRaycastLocationValid(rectTransform.position, xrCamera))
+            //{
+            //    model.SetActive(true);
+            //}
+            //else
+            //{
+            //    model.SetActive(false);
+            //}
+            //   Debug.LogError( "  MASK   YC   ");
+
+            model.SetActive(mask.IsRaycastLocationValid(rectTransform.position, xrCamera));
+        }
     }
 }

Some files were not shown because too many files changed in this diff