fix(cooldown-button): add a fake event to avoid null buttonSource
parent
ff548fec7e
commit
c2b8b39fa1
|
@ -144,9 +144,11 @@ namespace UnityEngine.UI.Extensions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void StartCooldown()
|
public void StartCooldown()
|
||||||
{
|
{
|
||||||
OnCooldownStart.Invoke(new PointerEventData.InputButton());
|
PointerEventData emptySource = new PointerEventData(EventSystem.current);
|
||||||
|
buttonSource = emptySource;
|
||||||
|
OnCooldownStart.Invoke(emptySource.button);
|
||||||
cooldownTimeRemaining = cooldownTimeout;
|
cooldownTimeRemaining = cooldownTimeout;
|
||||||
cooldownActive = cooldownInEffect = true;
|
CooldownActive = cooldownInEffect = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue