i have written my first plugin for unity, and it seems to be working quite well. the plugin reads data from a griffin powermate knob. to keep the data in sync, i am using the Update() method to update the data and cache it for other reads in the same frame. the only thing i dont quite understand yet is when does that Update get called? i would like it to be called at the beginning of the frame before any objects are updated that may use that data. is there a way to guarantee when it will be called?
Update is called during the rendering part, you have no control over when there nor the order of objects in which it is happening.
What you might want to do is use LateUpdate and cache the data for the next frame as lateupdate will always happen the other updates
ok, that makes sense. it doesnt really matter when the data is updated, but i didnt want it to happen in the middle of a frame.