Newer
Older
Stefan Richter
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Collections;
using System.Diagnostics;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using static UIconfig;
using static CommunicationEvents;
public class StartServer_mctrl : MonoBehaviour
{
public GameObject ServerScriptGObj;
// Start is called before the first frame update
void Start()
{
StartCoroutine(ServerRoutine());
}
// Update is called once per frame
void Update()
{
}
IEnumerator ServerRoutine()
{
//Wait for 1 seconds
yield return new WaitForSecondsRealtime(1f);
if (ServerAutoStart == true)
{
ServerScriptGObj.SetActive(true);
}
}
}