Create object controlled by a class

I’m starting a class with an object attached to it, but don’t find the way to call this class to replicate the object many times. I started creating a List but unity console said I need to Instantiate instead of creating a List.
How can I do this?

using UnityEngine; 
using System.Collections;

 public class Electrodes : MonoBehaviour {
public string name = "p 11";
public Vector3 myPosition;
public Vector3 textPosition = new Vector3(10,0,0);
public Color myColor = new Color (255,0,0);
public GameObject electrode ;
public TextMesh n_text;

public void init (string inName, Vector3 inVec) {
	name = inName;
	myPosition = inVec;

	//Destroy (electrode);

public void Start(){
	GameObject head = GameObject.Find ("Epilepsy_Data");
	electrode = GameObject.Find ("Electrode");
	electrode.GetComponent<Renderer>().material.SetColor ("_Color", myColor);
	electrode.GetComponent<Electrodes> ().name = name;
	electrode.transform.parent = head.transform;
	n_text = new GameObject ( <TextMesh> () as TextMesh;
	n_text.GetComponent<TextMesh> ().text =;
	//n_text.font = newFont;
	n_text.transform.parent = electrode.transform;
	//n_text.GetComponent<Renderer> ().material = n_text.font.material;
	//n_text.GetComponent<Renderer> ().material.mainTexture = n_text.font.material.mainTexture;
	n_text.GetComponent<MeshRenderer> ().castShadows = false;
	n_text.GetComponent<MeshRenderer> ().receiveShadows = false;
	n_text.GetComponent<Renderer> ().material.renderQueue = 3000;
	n_text.transform.localPosition = new Vector3(0.5f,0,0);
	n_text.fontSize = 18;
	n_text.richText = true;
	//n_text.renderer.gameObject.layer = 1;
	n_text.anchor = TextAnchor.MiddleLeft;
	n_text.fontStyle = FontStyle.Normal;

void Update () {



As the Unity console correctly suggested already, you can use the “Instantiate” function to create objects based on another object, which then acts as a template.

For example:

for(int i = 0; i < 20; i++)
    GameObject newElectrode = Instantiate(electrode, myPosition + Random.insideUnitSphere * 2, Quaternion.identity) as GameObject;
    // Do more custom stuff per electrode

Maybe you’d want to add those objects to a list inside the loop to be able to work with them later.