I creat one cube and Cylinder. I want to cube automatically find Cylinder. I need to write Enemy AI.
This my script.
using UnityEngine; using System.Collections;
public class EnemyAI : MonoBehaviour {
public Transform target;
public int moveSpeed;
public int rotationSpeed;
private Transform Cube
void Awake() {
Cube = transform;
}
// Use this for initialization
void Start () {
GameObject = GameObject.FindGameObjectWithTag("Cylinder");
target = transform("Cylinder");
}
// Update is called once per frame
void Update () {
}
}
I have wrong.What is mean?
Assets/NewBehaviourScript.js(16,6): UCE0001: ';' expected. Insert a semicolon at the end.