playMaker

Author Topic: Change sprite on Ipad  (Read 1237 times)

TerraImagina

  • Playmaker Newbie
  • *
  • Posts: 33
Change sprite on Ipad
« on: February 03, 2020, 06:26:35 AM »
Hi everyone,

I was testing my app with a build on ipad. Almost everything is working fine, exept when I have sprites that change on touch. I used a Set Property to replace a sprite on mouseDown, and another to set the old one on MouseUp.
The script work on PC with the mouse, and on ipad throught the unity connect app with finger touch, but not when I build.


Is it a know issue ? Is there a better way to change a sprite ?

Thanks :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Change sprite on Ipad
« Reply #1 on: February 03, 2020, 07:20:02 AM »
Hi,
You should use dedicated actions. if you don't find them in the standard included, have a look on the Ecosystem
You can find many custom actions there.

When using Get/Set Properties you need to use the linker wizard and play the whole game to be sure everything is detected.

Also Get/Set Properties uses reflection, which means they are slower than dedicated actions.
but with a small amount it is not noticeable.

TerraImagina

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Change sprite on Ipad
« Reply #2 on: February 03, 2020, 07:49:31 AM »
Ok Thank you for your response djaydino! I didn't know about Get/Set  properties being different from the other actions... I will be more careful about that now. And thanks for linking to the Linker Wizard package.
I am trying with the swap sprite action on the ecosystem, is working fine via unity connect so far.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Change sprite on Ipad
« Reply #3 on: February 03, 2020, 09:22:47 AM »
Hi if you don't find an action feel free to ask :)

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Change sprite on Ipad
« Reply #4 on: February 03, 2020, 12:33:26 PM »
Swap sprite should work, I am using it very often too :)