playMaker

Author Topic: [SOLVED] "Touch Event Not On U Gui" Action not working on Build?  (Read 1228 times)

Infamous

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
[SOLVED] "Touch Event Not On U Gui" Action not working on Build?
« on: November 27, 2019, 12:10:11 AM »
Hello there-

I have been working on a project and I am using "Touch Event Not On U Gui" Action from the Ecosystem.

- In the Editor, it works fine with a mouse click.

- In the Editor while connecting my phone over USB and using it as a touch input: It works fine.

- After deployment to TestFlight: touches are going through u gui


Does this action require LinkerWizard?

Im confused at this point and would appreciate all the help.

Thanks
« Last Edit: December 03, 2019, 06:06:14 AM by Infamous »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4968
    • View Profile
    • jinxtergames
Re: "Touch Event Not On U Gui" Action not working on Build?
« Reply #1 on: November 27, 2019, 03:24:59 AM »
Hi.
Touch Event Not On U Gui should not require LinkerWizard.

I do not know why it is not working on your build tho.

If its looping, its possible that you need a Next Frame in between
When playing in editor there are a lot less frames per second than in build.
Things could work in editor but break in build.

Try using some ui text and set text action to see if the action is triggered or not.

Infamous

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: "Touch Event Not On U Gui" Action not working on Build?
« Reply #2 on: November 27, 2019, 03:52:32 AM »
Hello there-

I do not think there is a loop. Also, the actions after the click go through as if there was no ugui.

The set up goes like this:

State 1:
Wait for mouse down - go to state 2

State 2:
Is it over ugui?
Yes - go back to state 1
No - go to state 3

State 3
Show UI then back to state 1

Could the “mouse down” system event be the issue here?
Should I trigger it with touch event instead?

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4968
    • View Profile
    • jinxtergames
Re: "Touch Event Not On U Gui" Action not working on Build?
« Reply #3 on: November 28, 2019, 02:52:53 AM »
Hi.
That's very possible yes.

You can add some actions to the states (change color or set a text or something)
or add some states in between. to see if the states/actions are working.

Infamous

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: "Touch Event Not On U Gui" Action not working on Build?
« Reply #4 on: December 02, 2019, 04:49:55 AM »
Hello there-

I was hoping to come in here and say that it is solved, however, after intensive testing and building the issue is still there.

I replaced the “Mouse Down” event with touch object event, added text GUI to the same state,... in the editor it works fine, but not on build.

The state runs but the script triggers not over GUI instead of over GUI.

This is really breaking our game and we just need confirmation if we should look into an alternate method.

Any help is greatly appreciated

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15237
  • Official Playmaker Support
    • View Profile
Re: "Touch Event Not On U Gui" Action not working on Build?
« Reply #5 on: December 03, 2019, 01:33:15 AM »
Hi,

 the action is a straight access to unity api, so is the mouse system events, so unfortunatly. There is nothing we can do if Unity is not consistent between the editor and mobiles.

Make sure you properly use the touch inputs on mobile and mouse in editor.

Bye,

 Jean

Infamous

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: "Touch Event Not On U Gui" Action not working on Build?
« Reply #6 on: December 03, 2019, 05:22:35 AM »
Hello there-

Got it fixed. Updating to help others.

I had to edit the action in the following way:

- removed mouse down support
- added a fingerId variable to be used as reference

Not sure which one of the two did the job.


Let me know if I should include the edited action for view.

Cheers

Edit: added [SOLVED] tag
« Last Edit: December 03, 2019, 06:06:56 AM by Infamous »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15237
  • Official Playmaker Support
    • View Profile
Re: [SOLVED] "Touch Event Not On U Gui" Action not working on Build?
« Reply #7 on: December 03, 2019, 11:19:54 AM »
Hi,

 yes, that would be good, because It works here, so if you can show what you did, I can try to replicate your issue and validate your changes.

Bye,

 Jean

Infamous

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: [SOLVED] "Touch Event Not On U Gui" Action not working on Build?
« Reply #8 on: December 03, 2019, 11:39:34 PM »
Hello Jean-

Does it work for you after you deploy to iPhone? because for me it works in the editor and unity remote. However, after deployment through Apple TestFlight, it does not work. At least for me. I have made at least 9 builds to try and fix this.

I am using iPhone Xs with latest iOS. It seemed to me that the original action was referencing touch fingerId 0.

Anyways, I have attached the edited action that worked for me.

State 1:
- Wait for Touch Begin and store fingerId then move to State 2

State 2:
Check if the touch with the same fingerId is over u gui or not.... etc


Let me know if you can replicate the issue on your end.

Cheers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15237
  • Official Playmaker Support
    • View Profile
Re: [SOLVED] "Touch Event Not On U Gui" Action not working on Build?
« Reply #9 on: December 05, 2019, 04:28:17 AM »
Hi,

 yes, makes total sense, I'll update the original action to add the finger id as an option, not sure why I did not make it like that straight away.

Bye,

 Jean