This question was
closed Feb 22, 2017 at 10:50 AM by
funbarn for the following reason:
got an answer form a another post
Error CS1525 in Unity 5.5.1 (Urgent)
Can you please help me solve this?
thanks
using UnityEngine; using System.Collections; using System.Collections.Generic;
public class Ship_2 : MonoBehaviour {
// Use this for initialization
void OnTriggerEnter(Collider collider) {
if (collider.tag == "player") {
FindObjectOfType<Cube(1)>().StartRespawnCoroutine(collider,gameObject);
}
}
}
Comment
Answer by Cameron_SM · Feb 22, 2017 at 08:00 AM
Simple syntax error as class names cannot have braces "(" or ")" in them. Did you mean Cube_1 instead of Cube(1)?:
FindObjectOfType<Cube(1)>
FindObjectOfType(StartRespawnCoroutine(collider,gameObject);
Still giving me the same error