this.gameObject.renderer.enabled=false;
替换成:
this.gameObject.GetComponent<Renderer>().enabled = false;
之后的获取某个组件的代码都应替换成“GetComponent<>”
this.gameObject.renderer.enabled=false;
替换成:
this.gameObject.GetComponent<Renderer>().enabled = false;
之后的获取某个组件的代码都应替换成“GetComponent<>”