Halo Pulse and disable/enable

I found a few posts on the forum related to this, but most seem to speculate that this may not be possible. Hoping someone from the mother ship can confirm/deny.

I have a sphere with a Halo attached so it appears to glow. Looks good, works nicely, and even behaves well on iPhone. Woo hoo!

Now I want to control it so that when I enable the item it goes from off to on and script the size so I can make the glow pulse. I can’t seem to get access to the effect and I can’t find a “type” for it.

If I do this…

var myHalo : Halo; --invalid type

GetComponent does not seem to like “Halo” either.

Is this really off limits/uncontrollable via scripting?

Unfortunately, by a cursory look through the code it seems that Halo is a built-in component that is not exposed for scripting. However, you can treat it as a Behaviour for adding via code or for enabling/disabling. Since you won’t be able to get at the individual color/size fields you probably could create a few discrete variations and store them on prefabs and instantiate specific prefabs.

Here is an example of adding and controlling via code:

function Start() {
	var c : Behaviour = gameObject.AddComponent( "Halo" );
	c.enabled = false;
}

function Update () {	
	var c : Behaviour = GetComponent( "Halo" );
	c.enabled = true;
}