Search Unity

ScrollRect subclass doesn't receive events?

Discussion in 'Scripting' started by jhorneman, Jan 28, 2015.

  1. jhorneman

    jhorneman

    Joined:
    Feb 27, 2014
    Posts:
    4
    I've made a component that subclasses ScrollRect so I can snap to specific elements in the content panel.

    I want to inhibit the normal scroll events and thought I could do so by overriding OnDrag etc. with empty functions. But this doesn't work - in fact, these functions are never even called. The parent class (ScrollRect)'s event handling keeps working fine.

    I'm probably missing something. Does anyone know what I'm doing wrong?