Beispiel #1
0
        public static InputObservableContext DefaultInputContext(this MonoBehaviour behaviour, EventSystem eventSystem = null)
        {
            if (defaultContext != null)
            {
                throw new InvalidOperationException("already created defaultContext");
            }
#if UNITY_EDITOR || UNITY_WEBGL
            defaultContext = new MouseInputContext(behaviour, eventSystem);
#elif UNITY_ANDROID || UNITY_IOS
            defaultContext = new TouchInputContext(behaviour, eventSystem);
#endif
            return(defaultContext);
        }
Beispiel #2
0
 static void _initDefaultContext()
 {
     defaultContext = null;
 }
Beispiel #3
0
 public TouchInputObservable(InputObservableContext context, int index) : base(context)
 {
     this.index = index;
 }