Which is the fastest method: global var or get component

Please,

I have a doubt about speed and optimization in my script.

I’m currently using a global var (static var) to point some data into another script. But also I tried to use the GetComponent (or other method to acess functions from diferents scripts).

Which is the fastest? Supose that I have hundreds of line code and models in my screen… I need to let the game run the best possible (of course)…

Thanks for the help

i thing global var, cause it saves info, and you just get it, and no need to call functions etc :slight_smile:

Hmm… yeah, maybe :slight_smile:

Thanks for the reply