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); }
static void _initDefaultContext() { defaultContext = null; }
public TouchInputObservable(InputObservableContext context, int index) : base(context) { this.index = index; }