Hi! I’m learning how to use unity, I’m doing something on a tutorial from BugZerg Arcade, but got an error
this is the link of the tutorial
http://www.youtube.com/watch?v=O8-oZfi4utY&feature=player_embedded#!
this is the error
Assets/Scripts/EnemyAI.cs(17,17): error CS0029: Cannot implicitly convert type UnityEngine.GameObject[ ]' to
UnityEngine.GameObject’
and this is my code:
using UnityEngine;
using System.Collections;
public class EnemyAI : MonoBehaviour {
public Transform target;
public int moveSpeed;
public int rotationSpeed;
private Transform myTransform;
void Awake(){
myTransform = target;
}
// Use this for initialization
void Start () {
GameObject go = GameObject.FindGameObjectsWithTag(“Player”) ;
}
// Update is called once per frame
void Update () {
}
}
Help! what’s wrong with the code?