playMaker

Author Topic: [SOLVED BY ME] U Gui Scroll Bar Set Value Problem  (Read 7698 times)

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
[SOLVED BY ME] U Gui Scroll Bar Set Value Problem
« on: February 22, 2016, 03:43:16 PM »
Hi. I add items with spawning at a scroll rect. I want that when each object is added then scroll bar follows it. Like a messaging app.

After spawning I use U Gui Scroll Bar Set Value to 0 or 0.1 for following. But it doesnt have value properly. It jumps a little but value doesnt set properly. Where is problem?
« Last Edit: February 28, 2016, 06:45:46 AM by johannastephen »

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #1 on: February 23, 2016, 09:19:09 AM »
Up

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: U Gui Scroll Bar Set Value Problem
« Reply #2 on: February 23, 2016, 11:06:06 AM »
Have you tried setting the value to 1 to keep it at the bottom?

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #3 on: February 24, 2016, 11:27:51 AM »
Yes. When i set the value to 1, it keeps at bottom. I also changed scrollbar direction to "". But it doesnt work. Is there any Playmaker supported scroller plugin? Or any suggestions?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: U Gui Scroll Bar Set Value Problem
« Reply #4 on: February 24, 2016, 11:48:38 AM »
Yes. When i set the value to 1, it keeps at bottom.

I'm confused, isn't that what you want? That's the way messaging apps typically work. Can you post a screenshot of the problem, or desired behaviour...

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #5 on: February 24, 2016, 12:02:28 PM »
Yes. When i set the value to 1, it keeps at bottom.

I'm confused, isn't that what you want? That's the way messaging apps typically work. Can you post a screenshot of the problem, or desired behaviour...

Oops! I wrote wrong. It keeps at top. Here are screenshots:

« Last Edit: February 24, 2016, 12:26:18 PM by johannastephen »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: U Gui Scroll Bar Set Value Problem
« Reply #6 on: February 24, 2016, 01:13:16 PM »
Hi,

 It's because you need to scroll the content itself, not actually trying to control the scrolling using the scrollbar itself.

I don't think there is a custom action for this tho ( use SetProperty action for now). I'll come up with an action tomorow.

Bye,

 Jean

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #7 on: February 24, 2016, 03:59:11 PM »
Hi,

 It's because you need to scroll the content itself, not actually trying to control the scrolling using the scrollbar itself.

I don't think there is a custom action for this tho ( use SetProperty action for now). I'll come up with an action tomorow.

Bye,

 Jean

Thank you Jean. I'm waiting. Thanks for your interest.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: U Gui Scroll Bar Set Value Problem
« Reply #8 on: February 26, 2016, 12:32:21 AM »
Hi,

 sorry, I just realized the action was made already :)

uGuiScrollRectSetNormalizedPosition

It's in the ugui package already,

 Sorry about the wait!

Bye,

 Jean

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #9 on: February 26, 2016, 09:55:03 AM »
Hi,

 sorry, I just realized the action was made already :)

uGuiScrollRectSetNormalizedPosition

It's in the ugui package already,

 Sorry about the wait!

Bye,

 Jean

Thanks Jean. But i could not be succesful. It doesn't work for me. Scrollbar still jumps. And doesnt move to bottom. Why? My prefabs have Layout Element component. And my scrollview's child object has Content Size Fitter and Vertical Layout Group. Problem is there?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: U Gui Scroll Bar Set Value Problem
« Reply #10 on: February 26, 2016, 10:08:32 AM »
Hi,

 Starts with an empty scene and build it from scratch starting with simple content, then complexify using prefabs, etc etc

I'll make an example if you don't succeed.

 Bye,

 Jean

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #11 on: February 26, 2016, 01:16:59 PM »
Hi,

 Starts with an empty scene and build it from scratch starting with simple content, then complexify using prefabs, etc etc

I'll make an example if you don't succeed.

 Bye,

 Jean

Thank you, Jean. You're so kind. I guess that problem is scrollrect's smooth movement. When i use uGui Set Normalized Position and it doesnt reach at 0f value. Because the next state is active and the 2nd state i spawn objects again. For that reason a new one spawns, but scrollrect is still not at 0f.

I write a custom action for getting normalized value for scrollrect. Now i can be sure about the value. (wtih Float compare action) You can implement my custom action in EcoSystem.

Thank you.

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #12 on: February 27, 2016, 05:25:55 AM »
Hi,

 Starts with an empty scene and build it from scratch starting with simple content, then complexify using prefabs, etc etc

I'll make an example if you don't succeed.

 Bye,

 Jean

Thank you, Jean. You're so kind. I guess that problem is scrollrect's smooth movement. When i use uGui Set Normalized Position and it doesnt reach at 0f value. Because the next state is active and the 2nd state i spawn objects again. For that reason a new one spawns, but scrollrect is still not at 0f.

I write a custom action for getting normalized value for scrollrect. Now i can be sure about the value. (wtih Float compare action) You can implement my custom action in EcoSystem.

Thank you.

It didn't work. It still jumps. Here is my capture:

Where am i doing wrong?

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #13 on: February 27, 2016, 12:56:12 PM »
Hi,

 Starts with an empty scene and build it from scratch starting with simple content, then complexify using prefabs, etc etc

I'll make an example if you don't succeed.

 Bye,

 Jean

Thank you, Jean. You're so kind. I guess that problem is scrollrect's smooth movement. When i use uGui Set Normalized Position and it doesnt reach at 0f value. Because the next state is active and the 2nd state i spawn objects again. For that reason a new one spawns, but scrollrect is still not at 0f.

I write a custom action for getting normalized value for scrollrect. Now i can be sure about the value. (wtih Float compare action) You can implement my custom action in EcoSystem.

Thank you.

It didn't work. It still jumps. Here is my capture:

Where am i doing wrong?

Jean, i dont succeed. I tried ScrollRect velocity. But it doesnt work. I write another 2 custom actions for ScrollRect Velocity. You can also implement these actions to EcoSystem.

Can you help me? Take a look my vid.

johannastephen

  • Playmaker Newbie
  • *
  • Posts: 35
Re: U Gui Scroll Bar Set Value Problem
« Reply #14 on: February 28, 2016, 06:45:06 AM »
Hi,

 Starts with an empty scene and build it from scratch starting with simple content, then complexify using prefabs, etc etc

I'll make an example if you don't succeed.

 Bye,

 Jean

Thank you, Jean. You're so kind. I guess that problem is scrollrect's smooth movement. When i use uGui Set Normalized Position and it doesnt reach at 0f value. Because the next state is active and the 2nd state i spawn objects again. For that reason a new one spawns, but scrollrect is still not at 0f.

I write a custom action for getting normalized value for scrollrect. Now i can be sure about the value. (wtih Float compare action) You can implement my custom action in EcoSystem.

Thank you.

It didn't work. It still jumps. Here is my capture:

Where am i doing wrong?

Jean, i dont succeed. I tried ScrollRect velocity. But it doesnt work. I write another 2 custom actions for ScrollRect Velocity. You can also implement these actions to EcoSystem.

Can you help me? Take a look my vid.

I got it  ;) There are 2 ways. First one is: Set ScrollRect Velocity to 9999999. It works. The second one is: Call action Canvas Force Update. And Call Set ScrollRect Normalized Position to 0. And again Call action Canvas Force Update. It works like a charm. For any better other suggestions, please reply. I hope that this thread helps. Thank you.