I need to simulate a button click in the Unity unit test, so that the button event handler worked and I compared the results. I tried:
GameObject facebookBtn = GameObject.FindGameObjectWithTag("Player"); // Кнопка bool res = ExecuteEvents.Execute<IPointerClickHandler>( facebookBtn, new PointerEventData(EventSystem.current), ExecuteEvents.pointerClickHandler); As far as I understand, pressing works because res = true , and the button handler does not work. I think this is due to the fact that this is done in editor mode, although Unit tests are not performed differently in a unit. I also get the error:
Ignoring menu item NGUI because it is in no submenu.
Has anyone come across something similar?