示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        obj    = GameObject.Find("Ball_Detection");
        Script = obj.GetComponent <Detection>();
        Debug.Log(Script.GetInstanceID());

        //anotherScript = GetComponentInParent<Detection>();
        //int i = anotherScript.CreateNum[0];
        //if (this.name == ("Cube_Detection(14)"))
        //{
        //    this.Num = 0;

        //}
        //else if(this.name == ("Cube_Detection(0)"))
        //{
        //    this.Num = 5;
        //}
        //else
        //{
        //    this.Num = 1;
        //}
        //this.Num = SetNum(Script.Num);

        //this.Num = SetNum(Script.Num);

        //this.Num = SetNum(Script.Num);
        ////this.Num = Script.Num1;
        //Debug.Log(Script.Num1);
    }