playMaker

Author Topic: Wait LateUpdate  (Read 4138 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Wait LateUpdate
« on: April 15, 2015, 07:04:27 PM »
A very, very, veeerrry simple action that i am using way more than expected. - Please try NextFrameEvent Action first before this.

Update: action + updates are on ecosystem or https://snipt.net/dudebxl/

Wait until all Updates are finished then SendEvent on LateUpdate (for the noobs like myself here is the link for the update order: http://docs.unity3d.com/Manual/ExecutionOrder.html)

Usage:
Need a delay(wait) but never know the amount of time needed. I was using 0,1 or 0,2 all the time but with this action when all the Updates are done then send event. Most actions use the Update event function but not all of them so find a "balance" in your project and use this as an alternative in parallel with the Wait action.
« Last Edit: May 31, 2015, 04:35:00 PM by dudebxl »

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Wait LateUpdate
« Reply #1 on: April 15, 2015, 10:42:29 PM »
I'm not sure when this works.  Does it wait until all actions in the state are done or how?   Not sure here.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Wait LateUpdate
« Reply #2 on: April 18, 2015, 12:08:48 PM »
Hi,

I use it to replace all my delays. So i have wait 0,1 sec cause FSM1 does x and then FSM2 starts or continues after 0,1sec. I could use a bool for this this but it is quicker to throw in this action. I am still learning so I am prone to mistakes... you need to test what feels right to your project.
« Last Edit: April 18, 2015, 12:11:50 PM by dudebxl »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Wait LateUpdate
« Reply #3 on: April 27, 2015, 05:08:30 AM »
Hi,

 And so this action works where the "nextFrameEvent" action doesn't? I am surprised, but willing to learn a use case for this.

 Bye,

 Jean

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Wait LateUpdate
« Reply #4 on: April 27, 2015, 09:05:53 AM »
Hi,

I am still learning so please be patient with me  :'(

I did not know about NextFrameEvent (so happy we have it, really need it lol). This action (waitLate...) is redundant then...

Thx for info and the feedback..  ;D
« Last Edit: April 27, 2015, 09:37:08 AM by dudebxl »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Wait LateUpdate
« Reply #5 on: April 27, 2015, 10:11:47 AM »
Hi,

 No worries :) It could have been an actual finding on your end. The next frame event will be fired on Update, not late Update, so there is still a difference with your action, but if it works by replacing with NextFrameEvent, then yes, it was redundant.


 Bye,

 Jean