Initial
This commit is contained in:
commit
36a53f343e
1 changed files with 300431 additions and 0 deletions
40
UnityProject/Assets/Scripts/menu/canvasChooser.cs
Normal file
40
UnityProject/Assets/Scripts/menu/canvasChooser.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/* Itt lehet állítani, hogy melyik build legyen szerver és melyik kliens.
|
||||
* WebGL szerver nem lehet.
|
||||
*/
|
||||
|
||||
public class canvasChooser : MonoBehaviour {
|
||||
|
||||
public GameObject serverStartCanvas;
|
||||
public GameObject clientStartCanvas;
|
||||
public GameObject mainCamera;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
#if UNITY_STANDALONE
|
||||
|
||||
serverStartCanvas.SetActive(false);
|
||||
clientStartCanvas.SetActive(true);
|
||||
mainCamera.SetActive(true);
|
||||
|
||||
/*serverStartCanvas.SetActive(true);
|
||||
clientStartCanvas.SetActive(false);
|
||||
mainCamera.SetActive(false);*/
|
||||
#endif
|
||||
#if UNITY_WEBGL
|
||||
serverStartCanvas.SetActive(false);
|
||||
clientStartCanvas.SetActive(true);
|
||||
mainCamera.SetActive(true);
|
||||
#endif
|
||||
#if UNITY_EDITOR
|
||||
|
||||
serverStartCanvas.SetActive(false);
|
||||
clientStartCanvas.SetActive(true);
|
||||
mainCamera.SetActive(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue