Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

116
Views
Does On Value Change based on framerate?

If I use an event OnValueChanged for an UI element, for example a slider. Is it better (for performance) to listen the slider values change in an Update() or does the event is already based on the same framerate than Update()?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

From the performance point of view, it is better for you to use the event rather than checking the value of the slider everything. Because in Update() your script is requesting the value of the slider and also checking the value of the slider because you want to check whether the value of the slider is changed or not, and an event will only be triggered when the value of the slider is changed.

And by a change in value I mean if you change the value of the slider either from a script or from the user sliding the sliding_head of the slider.

And this is true for all other Unity's UI elements that have OnValueChange() event for us to subscribe to.

I hope that this helps you sort out your confusion.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!