playMaker

Author Topic: some bug with "UiSliderSetValue"[SOLVED]  (Read 1236 times)

KonstantinSmirnov

  • Playmaker Newbie
  • *
  • Posts: 6
some bug with "UiSliderSetValue"[SOLVED]
« on: May 16, 2020, 10:05:16 AM »
Hello!
When I use this action for the first time - it works perfectly. But if I restart Unity, I have some red error. It's working but always has an error. I try to do it 3 times, and this bug is repeated always. How can I fix it?
« Last Edit: May 18, 2020, 02:48:52 AM by jeanfabre »

KonstantinSmirnov

  • Playmaker Newbie
  • *
  • Posts: 6
Re: some bug with "UiSliderSetValue"
« Reply #1 on: May 16, 2020, 12:17:48 PM »
I solved this problem :) It happens because the action "get owner" takes longer than if you make a direct link to the slider prefab. now not a single error :)))) little action "wait" resolve the problem

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: some bug with "UiSliderSetValue"
« Reply #2 on: May 17, 2020, 03:47:35 AM »
Hi.
Yes it faster to place a object directly in a variable or action.

But if you would need to use for example 'Get Fsm Gameobject' to get a different object, you can set a state to work in sequence. (select a state, then in the state window where the actions are, right click on a empty space and select 'Action Sequence')

The difference is :

Action Sequence Disabled :
Top action start, then next action start and so on

Action Sequence Enabled :
Top action starts, then wait for action to 'Finish' then start next action.

you can also do 'Get Fsm Gameobject' in state 1 and then slider in state 2, that would work the same as Action Sequence Enabled.
but you could end up with a lot of states then :)