📜  unity sendmessage vs getcomponent - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:03.128000             🧑  作者: Mango

代码示例1
SendMessage is absurdly much slower.
SendMessage has to go through every script,
look for a method with the same name using string comparrison (slower),
and call it. The GetComponent finds the script through type comparrison (faster),
and calls the method directly.