Hi
We have a button that pops up Inventory. It's Unity GUI, not AC gui, with custom code linked to buttons.
After updating to latest AC, player started to move to the point of that button on screen, instead of triggering Inventory. In previous AC version everything was fine. Unity 2019.1.9f1
Here how it looks:
https://monosnap.com/file/W7UAg70d176BUOcUk1ZpIENI2yzzLK
And how it was:
https://monosnap.com/file/FePpjlPJvbBih5VbbXBXRHyaYSFYmz
Thanks.
Comments
Please be specific with your AC versions - exactly which were you using before updating? I can't recall any recent change that may have affected this.
Unless your Button is linked to AC's Menu Manager, however, this would be expected. I shall consider adding an option to ignore point-control clicks if the mouse is over a UI element.
Was AC 1.67.5
Now 1.68.3
Button is not linked to AC's Menu Manager
Not being linked to the Menu Manager is what's doing it - but I will add in the auto-blocking option in the next release.
Thanks for answer.
Can you please tell some estimates for implementing auto-blocking option? It would be great to know that we can wait for AC release or try to fix by ourselves.
We were using custom Dummy AC menu script to avoid player move when clicked. But something went wrong. Here it is:
using AC;
using UnityEngine;
public class DummyACMenu : MonoBehaviour
{
[SerializeField] private Canvas _canvas = default(Canvas);
[SerializeField] private RectTransform _rectTransform = default(RectTransform);
}
I expect v1.68.4 will be out in the next week or two, but you can do a quick hack by inserting the following into line 110 of PlayerMovement.cs:
Thank you Chris. Your quick hack works.
Hi again
We've just updated to AC 1.68.4 and the problem still exist.
We saw UnityUIBlocksClick but not sure about how to use it correctly. Can you please explain this moment.
As the behaviour will affect existing games, the change is optional. To enable the effect, check Unity UI blocks interaction and movement? in the Settings Manager's "Interface settings".