hi, i get the following error in 2 scripts i tried and wanted to know whats wrong: “error CS8025: Parsing error”, thanks.
- void Start () {
}
void Update () {
}
void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.tag == new "Player")
{
GetComponent(MeshRenderer).enabled = false;
}
}
- void Start () {
}
void Update () {
if (Input.touchCount == 1)
{
Vector3 wp = Camera.main.ScreenToWorldPoint(Input.GetTouch(0).position);
Vector2 touchPos = new Vector2(wp.x, wp.y);
if (collider2D == Physics2D.OverlapPoint(touchPos))
{
GetComponent(MeshRenderer).enabled = false;
}
}