GameObject 与gameObject的区别

        //大写开头GameObject 与gameObject的区别
        //大写开头GameObject 是类,是class, 是苹果类,apples
        //小写开头gameObject 具体的个体,是对象,是这个苹果,apple

        //查找游戏物体GameObject
        GameObject.Find("apple");// 返回一个GameObject的对象
        GameObject myApple= GameObject.Find("apple");//所以应该写成这样
        //当然也可以写成这样,要根具需要
         GameObject.Find("apple").GetComponent<Transform>(); //查找到游戏物体后获取该游戏物体的Transform组件,返回值是Transform类型的组件
        Transform myTransform = GameObject.Find("apple").GetComponent<Transform>();//定义接收上例的返回值    
原文地址:https://www.cnblogs.com/madinglin/p/8502622.html