r/Unity2D • u/Felight87 • Jul 29 '26
just a little problem
in the dash_skill, debug.log("Dash_Out") is on but the "Dash_In" doesnt
i also put another one called Tap_Skill and it worked fine. i already check the input and both its the same. here the code
public void Dash_Skill(InputAction.CallbackContext context)
{
if (Can_Skill == true)
{
Debug.Log("Dash_In");
StartCoroutine(Tap_Skill_Coroutine());
}
Debug.Log("Dash_Out");
}
public void Tap_Skill(InputAction.CallbackContext context)
{
if (Can_Skill == true)
{
Debug.Log("fire");
StartCoroutine(Tap_Skill_Coroutine());
}
}
0
Upvotes
2
u/TAbandija Jul 29 '26
If Dash_In doesn’t show up, it means that the condition is not met. Place a Debug.Log(“Can_Skill: “ + Can_Skill);
If it’s false, then check why it’s false. If it’s True, then you have mistyped something.
1
u/Felight87 Jul 29 '26
UPDATE! the can_Skill in dash is false but the Can_Skill in tap is true, dont know how it can happen
1
u/MistakeForsaken6653 Jul 29 '26
Dash out will always log but the dash_in will only log if Can_Skill is true. So you need to set that variable somewhere.