コード例 #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);
        }
コード例 #2
0
 static void _initDefaultContext()
 {
     defaultContext = null;
 }
コード例 #3
0
 public TouchInputObservable(InputObservableContext context, int index) : base(context)
 {
     this.index = index;
 }