|
Is it possible to control the Halo component similar to the other components? Something like:
(comments are locked)
|
|
The Halo component isn't connected to the renderer class. You'd have to do this:
If it doesn't work, where are you calling it from and how? Just tested on the GameObject and it works well. I am calling it in a script attached to a prefab, which will be instantated during gameplay. Prefab also has a collider used as a trigger and a Halo component. I need to disable some components once something hits the trigger collider: function OnTriggerExit(other : Collider) { Destroy(other.gameObject); } But I get "BCE0019: 'enabled' is not a member of UnityEngine.Component'. " on line GetComponent("Halo").enabled=false; PS Sorry I am using a different acount, but I could not log in anymore...
Oct 02 '11 at 02:52 PM
eddyjohnson3
This technique does not compile for iOS
Mar 19 '12 at 09:58 PM
AaronC
I find it's better to pass a type argument to
The difference is crucial if you're using static typing.
Mar 20 '12 at 06:57 AM
rutter
(comments are locked)
|

If you're using C#, you need to do "GetComponent().enabled = false;" instead. The one Save referenced you to is a JavaScript-only implementation and the syntax won't be correct for C#.