@@ -366,6 +366,10 @@ internal void INTERNAL_AddPointer(Pointer pointer)
366366 {
367367 pointer . INTERNAL_Init ( nextPointerId ++ ) ;
368368 pointersAdded . Add ( pointer ) ;
369+
370+ #if TOUCHSCRIPT_DEBUG
371+ if ( DebugMode ) Debug . Log ( "TouchScript > Pointer Added: " + pointer ) ;
372+ #endif
369373 }
370374 }
371375
@@ -382,13 +386,17 @@ internal void INTERNAL_UpdatePointer(int id)
382386 if ( pointer == null )
383387 {
384388#if TOUCHSCRIPT_DEBUG
385- Debug . LogWarning ( "TouchScript > Pointer with id [" + id + "] is requested to MOVE to but no pointer with such id found." ) ;
389+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id + "] is requested to MOVE to but no pointer with such id found." ) ;
386390#endif
387391 return ;
388392 }
389393 }
390394
391395 pointersUpdated . Add ( id ) ;
396+
397+ #if TOUCHSCRIPT_DEBUG
398+ if ( DebugMode ) Debug . Log ( "TouchScript > Pointer Updated: " + pointer ) ;
399+ #endif
392400 }
393401 }
394402
@@ -405,19 +413,23 @@ internal void INTERNAL_PressPointer(int id)
405413 if ( pointer == null )
406414 {
407415#if TOUCHSCRIPT_DEBUG
408- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
416+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
409417 "] is requested to PRESS but no pointer with such id found." ) ;
410418#endif
411419 return ;
412420 }
413421 }
414422#if TOUCHSCRIPT_DEBUG
415423 if ( ! pointersPressed . Add ( id ) )
416- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
424+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
417425 "] is requested to PRESS more than once this frame." ) ;
418426#else
419427 pointersPressed . Add ( id ) ;
420428#endif
429+
430+ #if TOUCHSCRIPT_DEBUG
431+ if ( DebugMode ) Debug . Log ( "TouchScript > Pointer Pressed: " + pointer ) ;
432+ #endif
421433 }
422434 }
423435
@@ -435,19 +447,23 @@ internal void INTERNAL_ReleasePointer(int id)
435447 if ( pointer == null )
436448 {
437449#if TOUCHSCRIPT_DEBUG
438- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
450+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
439451 "] is requested to END but no pointer with such id found." ) ;
440452#endif
441453 return ;
442454 }
443455 }
444456#if TOUCHSCRIPT_DEBUG
445457 if ( ! pointersReleased . Add ( id ) )
446- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
458+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
447459 "] is requested to END more than once this frame." ) ;
448460#else
449461 pointersReleased . Add ( id ) ;
450462#endif
463+
464+ #if TOUCHSCRIPT_DEBUG
465+ if ( DebugMode ) Debug . Log ( "TouchScript > Pointer Released: " + pointer ) ;
466+ #endif
451467 }
452468 }
453469
@@ -465,19 +481,23 @@ internal void INTERNAL_RemovePointer(int id)
465481 if ( pointer == null )
466482 {
467483#if TOUCHSCRIPT_DEBUG
468- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
484+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
469485 "] is requested to REMOVE but no pointer with such id found." ) ;
470486#endif
471487 return ;
472488 }
473489 }
474490#if TOUCHSCRIPT_DEBUG
475491 if ( ! pointersRemoved . Add ( pointer . Id ) )
476- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
492+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
477493 "] is requested to REMOVE more than once this frame." ) ;
478494#else
479495 pointersRemoved . Add ( pointer . Id ) ;
480496#endif
497+
498+ #if TOUCHSCRIPT_DEBUG
499+ if ( DebugMode ) Debug . Log ( "TouchScript > Pointer Removed: " + pointer ) ;
500+ #endif
481501 }
482502 }
483503
@@ -495,19 +515,23 @@ internal void INTERNAL_CancelPointer(int id)
495515 if ( pointer == null )
496516 {
497517#if TOUCHSCRIPT_DEBUG
498- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
518+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
499519 "] is requested to CANCEL but no pointer with such id found." ) ;
500520#endif
501521 return ;
502522 }
503523 }
504524#if TOUCHSCRIPT_DEBUG
505525 if ( ! pointersCancelled . Add ( pointer . Id ) )
506- Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
526+ if ( DebugMode ) Debug . LogWarning ( "TouchScript > Pointer with id [" + id +
507527 "] is requested to CANCEL more than once this frame." ) ;
508528#else
509529 pointersCancelled . Add ( pointer . Id ) ;
510530#endif
531+
532+ #if TOUCHSCRIPT_DEBUG
533+ if ( DebugMode ) Debug . Log ( "TouchScript > Pointer Cancelled: " + pointer ) ;
534+ #endif
511535 }
512536 }
513537
0 commit comments