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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.IO;
using UnityEngine.Video;//streaming
using UnityEngine.Networking;
//using static StreamingAssetLoader;
//using static CheckServer;
//using static CommunicationEvents;
using static UIconfig;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem.UI;
public class EventsystemMode_Ctrl : MonoBehaviour
{
//public GameObject myself_GObj;
//public GameObject StandaloneInputModule_GObj;
//public GameObject InputSystem_GObj;
public StandaloneInputModule StandaloneInputModule_script;
public InputSystemUIInputModule InputSystem_script;
private int GpMode_before=-99;
void Start()
{
Update2();
}
private void Update()
{
/*
Update3();
*/
}
private void Update3()
{
if (GpMode_before != UIconfig.InputManagerVersion)
Stefan Richter
committed
{
Update2();
EventSystemModule = InputManagerVersion;
Stefan Richter
committed
}
if (GpMode_before != UIconfig.EventSystemModule)
{
Update2();
}
}
Stefan Richter
committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
private void Update2(){
//Todo Eventbased
//ClearUIC();
switch (UIconfig.EventSystemModule)
{
case 0:
break;
case 1:
//StandaloneInputModule_script.ActivateModule();
//InputSystem_script.DeactivateModule();
gameObject.GetComponent<StandaloneInputModule>().enabled=true;
gameObject.GetComponent<InputSystemUIInputModule>().enabled = false;
break;
case 2:
//InputSystem_script.ActivateModule();
//StandaloneInputModule_script.DeactivateModule();
gameObject.GetComponent<StandaloneInputModule>().enabled = false;
gameObject.GetComponent<InputSystemUIInputModule>().enabled = true;
break;
case 3:
gameObject.GetComponent<StandaloneInputModule>().enabled = false;
gameObject.GetComponent<InputSystemUIInputModule>().enabled = true;
break;
default:
gameObject.GetComponent<StandaloneInputModule>().enabled = false;
gameObject.GetComponent<InputSystemUIInputModule>().enabled = true;
break;
}
GpMode_before = UIconfig.GameplayMode;
}
/*
/// <summary>
/// Deactivates all Pages.
/// </summary>
private void ClearUIC()
{
for (int i = 0; i < myself_GObj.transform.childCount; i++)
{
myself_GObj.transform.GetChild(i).gameObject.SetActive(false);
}
}
*/