Instantiate does not exist in current context.

Hey there,

I’m trying to get this bit of code to work butI cannot seem to get the instantiate to work for me.

Any thoughts?

using UnityEngine;

using System.Collections;

public class UnitManager : MonoBehaviour
{

public GameObject GObject;

void Start ()
{	
  Unit.Create(GObject, Vector3.zero, Quaternion.identity, 0);
}

}

public class Unit

{

    public static GameObject[] Units = new GameObject[50];

    public static GameObject newUnit;

public static void Create(GameObject Builds, Vector3 positie, Quaternion rotatie, int ID)
{
    //1. Instantiate does not exist in current context.
	GameObject newUnit = Instantiate(Builds, positie, rotatie) as GameObject;
    //2. error CS0266: Cannot implicitly convert type `UnityEngine.Object' to `UnityEngine.GameObject'. An explicit conversion exists (are you missing a cast?)
    GameObject newUnit = GameObject.Instantiate(Builds, positie, rotatie);

	Units[ID] = newUnit;
}

}

//1. and //2. are the two different ways I tried to get it to work but neither are
working out for me.

GameObject newUnit = GameObject.Instantiate(Builds, positie, rotatie) as GameObject;