自Unity 2019.2起,Unity添加了可以处理这种情况的新API ——TryGetComponent API。与GetComponent相比,一个最大的区别是,当请求的Component不存在.
確定! 回上一頁