So, I have been instantiating a gameobject with a script attached, say S, to it. Each gameObject I instantiate is having different name. The Script S attached to each of this gameObject has three variables row, column & name. I know that the order in which these objects re instantiated will have their Update function executed first. Scripts S’s Update function makes some modifications to these variables but since the execution is not simultaneous & an update of one affects the update of other.
For example : I have instantiated a gameobject A with script values : row=2, column = 1, name = A & then instantiate another gameobject B with row=2, column=3, name = B. Update function of A changes row to 1 & column to 3 & Update of B changes row to 3 column to 0.
What
i want is to send the values of row & column to another script. But, since B gets executed after A, values sent by A gets overwritten by values sent by B.
I want to know if their is a way by which I can write a function after all the updates of same script(but different objects) have been executed?
Thanks in Advance!!