Browse Source

非创建者进入公开浏览房间后,仍然能创建场景

蓝色星空 2 years ago
parent
commit
70cf44682f
1 changed files with 10 additions and 1 deletions
  1. 10 1
      Assets/Studio/_4ShowScene/_ShowSceneCommonScripts/ShowViewMgr.cs

+ 10 - 1
Assets/Studio/_4ShowScene/_ShowSceneCommonScripts/ShowViewMgr.cs

@@ -9,6 +9,7 @@ using ShadowStudio.Model;
 using ShadowStudio.UI;
 using UnityEngine;
 using UnityEngine.SceneManagement;
+using UnityEngine.UI;
 using XRTool.Util;
 
 public class ShowViewMgr : UnitySingleton<ShowViewMgr>
@@ -95,7 +96,15 @@ public class ShowViewMgr : UnitySingleton<ShowViewMgr>
         ArtInfoMgr.Instance.ListenUser();
         roomId = CommonMethod.roomConfig.Id;
         //WSHandler.User.OnRoomChange += roomChange;
-        TimerMgr.Instance.CreateTimer(Init, 0.5f);
+        TimerMgr.Instance.CreateTimer(Init, 0.5f);
+
+        if (CommonMethod.roomConfig.Is_created == "0")
+        {
+            GameObject.Find("CreateSenceBtn").GetComponent<Button>().enabled = false;
+            Debug.LogError("非房主进入房间");
+        }
+        else
+            Debug.LogError("房主进入房间");
     }
 
     private void CreateSuccess(ArtContainer artContainer)