What is more efficient?

Making an static reference of the GameObject A and using it from some scripts
or
using GameObject.FindGameObjectWithTag(“A tag”) from every script.

Thanks in advance.

No doubt, make the variables. The choice of static or member depends on design. If there are just a few objects of interest, then a few static variables may be useful, but they must still be a member of some class, static as they are, and they’ll have to be ‘located’ in some fashion during initialization (perhaps Start or Wake). My own preference is to have the Start or Awake method of the object(s) of interest ‘register’ themselves, which avoids a ‘find’ method at initialization.


At best, 'find’s performance is dependent on how many objects are to be searched, and, of course, the device on which the software is running, but you can expect at most a few thousand per second on some platforms and conditions, while it might reach up to 100,000 per second on a PC or console. That may seem fast, but on that same platform a static or member reference to that same object may operate on the order of close to a million per second (could be a few million per second). When inside an Update or FixedUpdate, that really adds up to performance drain and, on mobile, battery drain.