Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: johannastephen on February 22, 2016, 03:43:16 PM

Title: [SOLVED BY ME] U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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?
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen on February 23, 2016, 09:19:09 AM
Up
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: Alex Chouls on February 23, 2016, 11:06:06 AM
Have you tried setting the value to 1 to keep it at the bottom?
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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?
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: Alex Chouls 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...
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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:

Title: Re: U Gui Scroll Bar Set Value Problem
Post by: jeanfabre 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
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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.
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: jeanfabre 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
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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?
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: jeanfabre 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
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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.
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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?
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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.
Title: Re: U Gui Scroll Bar Set Value Problem
Post by: johannastephen 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.
Title: Re: [SOLVED BY ME] U Gui Scroll Bar Set Value Problem
Post by: jeanfabre on March 02, 2016, 01:41:55 AM
Hi,

 Thanks for these tips. My computer died on me, so let me just get back on my feet and I'll push these two new actions on the github rep to be accessible to the ecosystem.

 Bye,

 Jean
Title: Re: [SOLVED BY ME] U Gui Scroll Bar Set Value Problem
Post by: johannastephen on March 03, 2016, 11:22:55 AM
Hi,

 Thanks for these tips. My computer died on me, so let me just get back on my feet and I'll push these two new actions on the github rep to be accessible to the ecosystem.

 Bye,

 Jean

Okay, Jean. I hope that you can come back soon. Thank you. (Mmm, there are 3 new actions. Please check out older posts.)