Browse Source

shader on

Виктор Шейко 4 years ago
parent
commit
22aa4300f7

+ 5 - 5
Assets/Scripts/Controllers/EditorController.cs

@@ -288,7 +288,7 @@ public class EditorController : MonoBehaviour
         button.onClick.AddListener(() =>
         {
             BeaconEdit(b, name_beacon);
-            //b.beacon.GetComponent<Renderer>().material.shader = shader1;
+            b.beacon.GetComponent<Renderer>().material.shader = shader1;
         });
         //var text = PanelBeaconEdit.transform.GetChild(0).GetComponent<Text>().text = "";
         //var uuid = PanelBeaconEdit.transform.GetChild(1).GetComponent<InputField>().text = "";
@@ -298,6 +298,8 @@ public class EditorController : MonoBehaviour
             b.location_id = location.id; 
             b.id = Convert.ToUInt32(4000000000 + Beacons.Count);
             b.enabled = true;
+
+            BeaconEdit(b, name_beacon);
         }
         
         var button_ok = PanelBeaconEdit.transform.GetChild(7).transform.GetChild(0).GetComponent<Button>();
@@ -315,7 +317,7 @@ public class EditorController : MonoBehaviour
         button_close.onClick.AddListener(() =>
         {
             PanelBeaconEdit.SetActive(false);
-            //b.beacon.GetComponent<Renderer>().material.shader = shader2;
+            b.beacon.GetComponent<Renderer>().material.shader = shader2;
         });
 
         var button_del = panel_button.transform.GetChild(2).GetComponent<Button>();
@@ -333,9 +335,7 @@ public class EditorController : MonoBehaviour
 
         if (!Beacons.ContainsKey(location.id))
             Beacons[location.id] = new List<Beacon>();
-        Beacons[location.id].Add(b);
-
-        BeaconEdit(b, name_beacon);
+        Beacons[location.id].Add(b);       
     }
 
     void BeaconEdit(Beacon b, string name_beacon)

+ 2 - 2
Assets/Scripts/Controllers/PlayerController.cs

@@ -26,7 +26,7 @@ public class PlayerController : MonoBehaviour
     public GameObject EndMin;
     public GameObject EndSec;
     public GameObject StartStopButton;
-    public GameObject ErrorDialog;
+    //public GameObject ErrorDialog;
     public Dropdown DropdownMode;
     public Toggle ToggleLine;
     public Toggle ToggleDisappearance;
@@ -351,7 +351,7 @@ public class PlayerController : MonoBehaviour
 
     public void ErrorDialogClose()
     {
-        ErrorDialog.SetActive(false);
+        Dialog.SetActive(false);
     }
 
     public void StopProgress()