Can't add Halo component through the script

Hi,
I’m trying to add Halo through the script

  this.gameObject.AddComponent<Halo>();   

I’ve this error : error CS0246: The type or namespace name `Halo’ could not be found. Are you missing a using directive or an assembly reference?

I really do not understand why i can not find Halo… any idea ?

I’ve already try to do the same things, a quick fix is to add your halo and disable it…
After you can enable it in script

	halo = (Behaviour)GetComponent ("Halo");
    halo.enabled = true;

I hope this help…

I ran into this issue as well and while I do not have a direct answer to your specific question, I do have a work-around.

Create an empty prefab with a Halo on it, and then Instantiate:

public GameObject HaloPrefab; // empty with halo applied to it...

// then, later on, when you want to add the halo:
GameObject halo = Instantiate(HaloPrefab) as GameObject;
halo.transform.SetParent (transform, false);