原文:Returns the component of Type type if the game object has one attached, null if it doesn't. You can access both builtin components or scripts with this function.
译文:如果这个游戏物体包含一个类型为type的组件,则返回它。如果没有则为空。通过这个函数,你可以访问内建的组件或者脚本的组件。
原文:getComponent is the primary way of accessing other components. From javascript the type of a script is always the name of the script as seen in the project view.
译文:getComponent()是访问别的组件的原始方法,对javascript来说,脚本的类型就是项目视图里面看到的脚本名称。