I have a Halo component attached to a child GameObject, but trying to use the Javascript
var h = GetComponentInChildren(Halo);
Gives
Assets/Selection.js(8,42): BCE0005: Unknown identifier: 'Halo'.
On the child GameObject itself, I can do this:
var test : Component = GetComponent("Halo");
Debug.Log("direct type: " + test.GetType());
which prints
direct type: UnityEngine.Behaviour
I expected to get the specific Halo type back (like UnityEngine.BoxCollider) rather than the generic Behavior.
Is there something “special” about Halo, where it doesn’t have its own type? If so, what’s the proper method for referencing it in a similar manner to GetComponentInChildren?
Using Unity 3.5.0f5, MonoDevelop 2.8.2