playMaker

Author Topic: U Gui Image Set Sprite [SOLVED]  (Read 590 times)

miguelfanclub

  • Full Member
  • ***
  • Posts: 152
    • View Profile
U Gui Image Set Sprite [SOLVED]
« on: March 26, 2019, 04:09:32 PM »
"U Gui Image Set Sprite" seems to not to work anymore when setting the sprite from a sprite var (or object set to Unity.engine - Sprite)

All the sprites var on the target are set to an empty texture without been null.

The var came set from another fsm just right on the "U Gui Image Set Sprite"  action




been "empty" at the target





« Last Edit: April 02, 2019, 02:54:03 PM by miguelfanclub »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: U Gui Image Set Sprite
« Reply #1 on: March 27, 2019, 12:26:35 AM »
Hi,

 uGui actions should be replaced by the official set so please use UiImageSetSprite.

 I will soon completly remove the ugui action and remake the samples to use the built in actions.

Bye,

 Jean

miguelfanclub

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Re: U Gui Image Set Sprite
« Reply #2 on: March 27, 2019, 03:31:18 PM »
Ok, i tried now with UiImageSetSprite with same result:

The sprite var came right from another FSM:



When I send it to the target GO (scroll image right):



Any idea?


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: U Gui Image Set Sprite
« Reply #3 on: March 28, 2019, 02:36:40 AM »
Hi.
Have you tried setting a break point?

Maybe at the time that you set the image int is not yet in the variable?

Also check in the variables if the image is there and that it is a sprite.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: U Gui Image Set Sprite
« Reply #4 on: March 28, 2019, 11:25:05 PM »
Hi,

 if you can isolate this, it will help.

 make sure you have just one fsm doing just that, and then debug it as Kurt said, it's  likely empty at the time of execution and then got filled up.

 turn on debugflow for example, and step back, you'll see the values at the time of execution.

that, or another fsm or script is setting that image sprite back to null right after your fsm.

 I tested here and it works fine, I did create a fsmVar or type sprite and it worked ( the fsm sprite variable is exactly that, but beautified by the playmaker editor).

 Bye,

 Jean

Broken Stylus

  • Sr. Member
  • ****
  • Posts: 282
    • View Profile
Re: U Gui Image Set Sprite
« Reply #5 on: March 30, 2019, 09:40:52 AM »
I see in the 1st picture that in the debug section of the Set Sprite action, there's UniteEngine.Texture2D.
Shouldn't that be UnityEngine.Sprite instead?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: U Gui Image Set Sprite
« Reply #6 on: March 31, 2019, 11:44:52 PM »
Hi,

 yep, only sprites are allowed.

 Bye,

 Jean

miguelfanclub

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Re: U Gui Image Set Sprite [SOLVED]
« Reply #7 on: April 02, 2019, 05:06:55 AM »
That was it guys.
So you need to drag the sprite component (the square icon child of the image once its converted to 2d Texture) and then it works.