It's generally recommended to cache the result of expensive calls like Camera.main and GetComponent inside the Start message and avoid calling them in Update/FixedUpdate.
Proposed solution
We should detect those calls, offer to cache the result and replace the invocations by the cached field.
It's generally recommended to cache the result of expensive calls like
Camera.mainandGetComponentinside theStartmessage and avoid calling them inUpdate/FixedUpdate.Proposed solution
We should detect those calls, offer to cache the result and replace the invocations by the cached field.