You are most likely looking for the (recently added, I think starting from 2019.2 and up) TryGetComponent . From the unity docs:.
確定! 回上一頁