tweaks
This commit is contained in:
@@ -62,9 +62,10 @@ public class NetManager : NetworkManager
|
||||
{
|
||||
Debug.Log("Client disconnected. Reconnecting...");
|
||||
StartClient();
|
||||
yield return new WaitForSeconds(reconnectIntervalSeconds);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(reconnectIntervalSeconds);
|
||||
yield return new WaitForSeconds(1);
|
||||
}
|
||||
|
||||
reconnectCoroutine = null;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SetActiveOnEditor : MonoBehaviour
|
||||
{
|
||||
public Component[] components;
|
||||
public GameObject[] gameObjects;
|
||||
public bool activeOnEditor = true;
|
||||
void Start()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
foreach(var component in components)
|
||||
{
|
||||
component.gameObject.SetActive(activeOnEditor);
|
||||
}
|
||||
foreach(var gameObject in gameObjects)
|
||||
{
|
||||
gameObject.SetActive(activeOnEditor);
|
||||
}
|
||||
#else
|
||||
foreach(var component in components)
|
||||
{
|
||||
component.gameObject.SetActive(!activeOnEditor);
|
||||
}
|
||||
foreach(var gameObject in gameObjects)
|
||||
{
|
||||
gameObject.SetActive(!activeOnEditor);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 333a4e464b877d44abda3fce877fa3be
|
||||
Reference in New Issue
Block a user