I have an array of GameObject
s with a MyScript
component attached to each. Every frame I need to update a value in MyScript
in each of the GameObject
s. Is calling GetComponent<>()
each frame for each object going to be slow? Should I create a separate array of MyScript
components of the corresponding GameObject
s instead?