Hi,
I have done a little script, to code a little effect of light and particles when my characters attack. Here you have:
//variables
public var efecto : Transform;
public var luz : Transform;
//on the code
while (true)
{
var isAttacking = playerController.IsAttacking ();
if (isAttacking){
efecto.active=true;
luz.active=true;
}
else{
efecto.active =false;
luz.active=false;
}
yield;
}
But when I use this method I have a problem, Unity returns me this error:
Assets/Scripts/Player/AttackEffectController.js(17,29): BCW0012: WARNING: 'UnityEngine.Component.active' is obsolete. the active property is deprecated on components. Please use gameObject.active instead. If you meant to enable / disable a single component use enabled instead.
What I can do? Lot of thanks in advance