Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cloudchen

Pages: [1] 2
1
Support / Re: Touch response is not quite good in ScrollableArea
« on: November 23, 2013, 02:46:20 pm »
Did you fix the sensitivity issue? After update to version 2.2.3, should I still tweak the value to get the balance between scrolling and touching?

2
Support / Re: tk2dUIManager.PressedItem alternative?
« on: November 18, 2013, 03:02:23 am »
I check the existence of tk2dUIManager again, yes it's there. I've noticed that the NullReferenceException seems caused by the UIItem which are inherited from the previous scene  via the DontDestroyOnLoad function. If I pressed the UIItem created in the current scene but not the previous one, everything works perfect!

3
Support / Re: tk2dUIManager.PressedItem alternative?
« on: November 15, 2013, 04:19:32 am »
OK, actually I would like to use UIManager's "PressedItem" to help check if user touched on a UIItem to prevent some events been triggered.

So:
Code: [Select]
if (tk2dUIManager.Instance.PressedUIItem != null)
{
Debug.Log(tk2dUIManager.Instance.PressedUIItem.name);
shouldTriggerEvent = false;
}

these lines of code did work before I upgrade to version 2.2.3, but after that I got "NullReferenceException" when system called the Debug.Log line above. Have any idea about it?

4
Support / Re: tk2dUIManager.PressedItem alternative?
« on: November 14, 2013, 07:41:53 am »
I have noticed that If I attached the "tk2dUICamera" to my tk2dCamera, it will automatically created a tk2dUIManager object when the scene get launched. However, the UI Camera field did not been assigned any tk2dCamera.

So if I called tk2dUIManager.Instance.PressedItem.name under this situation, I always get NullReferenceException right?

5
Support / tk2dUIManager.PressedItem alternative?
« on: November 12, 2013, 11:58:50 am »
After updated to version 2.2.3, I've notice the log message
Code: [Select]
It is no longer necessary to hook up a camera to the tk2dUIManager. You can simply attach a tk2dUICamera script to the cameras that interact with UI.I would like to know is there any alternative way to get the pressed item which the tk2dUIManager originally kept? Thanks

6
Support / Re: ScrollabeArea bouncing up and down
« on: November 08, 2013, 12:50:31 am »
I used 2D Toolkit Version 2.1 final + hotfix 1
Should I upgrade to newer version?

7
Support / ScrollabeArea bouncing up and down
« on: November 07, 2013, 06:30:00 am »
I have 4 tabs that shared the same ScrollableArea. ScrollableArea works perfect when I switch between different tabs generally. However, the ScrollableArea start bouncing up and down when I switch to other tab without stopping the previous scrolling behaviour. This happened when the currently scrollableArea is still scrolling and at that moment we triggered another event (click another tab) to replace the content of it. How could I prevent the scrollable area bouncing up and down issue?! Thanks and wait for your help.

8
Support / How could I bind/unbind the event of the uiItem dynamically?
« on: August 30, 2013, 12:25:12 pm »
I have lots of GameObjects in the scene, and each of them attached a tk2dUIItem object. Since the event(method) bound to each of the GameObject need some time to wait the completeness of the AssetBundle download job, I would like to avoid user triggering the event bound to other GameObject during the period of loading.

How could I toggle the bound event dynamically or there are other better solutions? Thanks and wait for your kindly aid.

9
Check the attached uiItem on tk2dUIUpDownButton again. Bingo! Just like the situation you mentioned, I referenced to wrong uiItem (the one attached on the row element but not the button itself...). Thank you for solving my dummy problem.

10
I have a tk2dUIUpDownButton which is located in each row of the list of the tk2dScrollableArea (as the picture shown).



I just down know why the tk2dUIUpDownButton get visually triggered when I pressed the row in the list but not the button (the event bound to tk2dUIUpDownButton did not get triggered though). The area of the BoxCollider of the each Row do cover the whole row, and the BoxCollider of the tk2dUIUpDownButton fit itself and its position is far front the Row elements'.

How could avoid this situation since user was not clicking the tk2dUIUpDownButton but it just get visually pressed effect? Thanks.

11
Support / Re: Touch response is not quite good in ScrollableArea
« on: August 19, 2013, 11:25:22 am »
Hi, I got another question while dealing with ScrollableArea. As the image in my 1st post shown, now I have 7 items in the row (so two out of the screen). If I scroll the content to the end and select the last item, the area will stop at the end of the row so that now the 1st and 2nd item will out of the screen instead.

I would like to know how could I make a script call so that the scrollable area returned to the launch status (the 1st item align the left border of the screen)?

12
Support / Touch response is not quite good in ScrollableArea
« on: August 15, 2013, 09:35:40 am »
I have lots of scrollable area controller object in my game, and I found the touch sensitivity/response is not very good when I try to click the items contain in the scrollable area.

For example, I have one looks like below:


When I click between those items, sometimes it just doesn't response to my clicking. Sometimes I need to click around 3 times on a single item to make the event got triggered.

Each item has a tk2dUIItem appended on it, and I use the OnClick event to trigger what I would like to do. I guess the problem might cause by the judgement between "scroll/click" state because the event got triggered immediately when I use the OnDown or OnRelease event instead. However, that will trigger the touch event even users just want to scroll to browse all of the items.

Sincerely wait for your aid, thanks again.

Update: (Thursday, August 15, 2013)
I found if I modified:
Code: [Select]
private const float SWIPE_SCROLLING_FIRST_SCROLL_THRESHOLD = .01fto a much more large value such as 30f, then this issue just got solved.

I use tk2dCamera as main camera and set Pixels per Meter to 1, force the Native Resolution be 720 x 1280. I guess there is no corresponding transformation of SWIPE_SCROLLING_FIRST_SCROLL_THRESHOLD according to different tk2dCamera setting?

13
Million thanks for your help, unikron. It does help me resolve this problem.

However, I have a tiny question about using a run-time created sprite. I just notice that it will create a lot copies of SpriteCollection when adopt this workaround. I got 4 tabs in a single scene, so that user could switch between them. Each time user click a tab, it will create tens of SpriteCollections and STILL ALIVE when user click other tab. The SpriteCollection keep accumulating in this level.



Would like to know if there is any way to handle those the auto-generated SpriteCollection?

14
Use the ScrollableArea to try to create a list like the ListView in Android platform. Trying to put a image on each row of this list, I manually created a template of the row item as a prefab then instantiated from it. However, the image looks like just overlapped at the 1st image (the prefab one). I checked through the inspector and everything seem act correctly. Just post my setting below:


I put the image on a plane object as one of children of the "RowItem" game object. The image download from Internet do show in the inspector correctly, but doesn't locate at the right position. In addition, the image doesn't scroll when I scroll the list. They just locate at the position where the image of prefab located.

Have no idea how to solve this problem. I think a workaround might be using a sprite to replace the plane? But I am pretty new to Unity and 2D Toolkit so that I don't know how can I download a image (.png or .jpg) from Internet and use it to replace the original sprite?!

15
Yes, I am trying to change the y value of the GameObject which hold the scrollableArea and then encountered this issue.
I don't use scrollbar hence the reference of the scrollbar is none. I will mail you as much as possible I can provide as soon as possible.

Update: Have sent the sample project to

Pages: [1] 2