Hey team!
Working on some fading in/out modals/popups…
i notised that after hovering a button, it refuses to respect the hierarchy alpha?
It appears to happen after these functions run, nulling them sorts the issue, but i want to keep them for the hover effect!
button.pointerEnterAnimation // Reduces button's alpha by 0.1 on pointer hover.
button.pointerOutAnimation // Restores button's alpha to original state / 1 by default.
I don’t quite understand why this happens at the moment
If you never hover the button, the alpha is 1, and stays 1, and the fade on hierarchy works and looks fine!
But if the alpha is changed at all, it starts to ignore the hierarchy alpha!
Any thoughts?
Edit;
I think i found the root cause…
The bug only occurs when Control._alphaSet = true; (any changes from default Alpha)
And the control is a several times child of the main container where alpha is being use to fade the whole hierarchy (group of nested GUI elements).
In this case, it is only checking the alpha of the direct parent
context.globalAlpha = this.parent && !this.parent.renderToIntermediateTexture ? this.parent.alpha * this._alpha : this._alpha;