2D Toolkit Forum

2D Toolkit => Support => Topic started by: prjhal on June 25, 2013, 10:28:54 am

Title: tk2dUIScrollableArea OnScroll
Post by: prjhal on June 25, 2013, 10:28:54 am
Hello

I purchased the new version of 2DToolkit and have installed the latest hot fix.

I have to say this plugin is brilliant, finding very easy to use but i have run into a problem using tk2dUIScrollableArea.

I've created the scrollable area and my content scrolls perfectly but i cannot get it to fire the HandleScroll event.

I've looked in the source code for the class and can't see where:

public event System.Action<tk2dUIScrollableArea> OnScroll;

is ever invoked.

Is this a known issue or am i doing something incorrectly.

Thanks in advance.

Phil Halston
Bejig

 protected void CreateScrollableArea()
        {
            scrollableArea = GetComponentInChildren(typeof(tk2dUIScrollableArea)) as tk2dUIScrollableArea;

            Debug("Scrollable Area" + scrollableArea);

            scrollableArea.OnScroll += HandleScroll;

            //Debug("Scrollable Area" + scrollableArea.OnScroll);
        }

        protected void HandleScroll(tk2dUIScrollableArea obj)
        { // never gets called
            Debug("Handle Scroll" + obj);
        }
Title: Re: tk2dUIScrollableArea OnScroll
Post by: unikronsoftware on June 25, 2013, 10:43:34 am
Its a known issue and on the todo. Will be fixed soon.