Browse Source

client fix

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

+ 2 - 1
Assets/Scripts/Controllers/AuthorizationController.cs

@@ -17,11 +17,12 @@ public class AuthorizationController : MonoBehaviour
     public static bool error = false;
     static string textError = "Неправильный логин или пароль";
 
-    Client client = new Client();
+    Client client;
 
     // Start is called before the first frame update
     void Start()
     {
+        client = Camera.main.GetComponent<Client>();
         var waslogin = PlayerPrefs.GetString("lastlogin");
         var waspass = PlayerPrefs.GetString("lastpass");
 

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

@@ -43,7 +43,7 @@ public class PlayerController : MonoBehaviour
     int mode = 0;
     //public GameObject Time;
 
-    static Client client = new Client();
+    static Client client;
 
     DateTimePicker Date;
 
@@ -67,6 +67,7 @@ public class PlayerController : MonoBehaviour
     void Start()
     {
         DebugHelper.ActivateConsole();
+        client = Camera.main.GetComponent<Client>();
         markers = new List<Marker>();
         locations = new List<Location>();
 

+ 0 - 6
ProjectSettings/EditorBuildSettings.asset

@@ -8,10 +8,4 @@ EditorBuildSettings:
   - enabled: 1
     path: Assets/Scenes/Player.unity
     guid: c0b38db15ebfc8b4fbd5046c1b62bfd8
-  - enabled: 1
-    path: Assets/Scenes/Editor2D.unity
-    guid: 30de5117aa1ad344398e2b3c802389e3
-  - enabled: 1
-    path: Assets/Scenes/Editor3D.unity
-    guid: ef6a7447f6450d2439c4e8ac7471e6bc
   m_configObjects: {}