private Activatable GetActivatable() { RaycastHit hit; if (Physics.Raycast(head.position, head.forward, out hit, maxActivateRange, activationMask)) { Activatable activatable = hit.collider.GetComponent <Activatable>(); if (activatable != null && activatable.CanBeActivated(this)) { return(activatable); } else { return(null); } } else { return(null); } }