playMaker

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

miguelfanclub

  • Full Member
  • ***
  • Posts: 165
U Gui Image Set Sprite [SOLVED]
« on: March 26, 2019, 07: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, 05:54:03 PM by miguelfanclub »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: U Gui Image Set Sprite
« Reply #1 on: March 27, 2019, 03: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: 165
Re: U Gui Image Set Sprite
« Reply #2 on: March 27, 2019, 06: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: 7614
    • jinxtergames
Re: U Gui Image Set Sprite
« Reply #3 on: March 28, 2019, 05: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: 15500
  • Official Playmaker Support
Re: U Gui Image Set Sprite
« Reply #4 on: March 29, 2019, 02:25:05 AM »
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

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: U Gui Image Set Sprite
« Reply #5 on: March 30, 2019, 12:40:52 PM »
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: 15500
  • Official Playmaker Support
Re: U Gui Image Set Sprite
« Reply #6 on: April 01, 2019, 02:44:52 AM »
Hi,

 yep, only sprites are allowed.

 Bye,

 Jean

miguelfanclub

  • Full Member
  • ***
  • Posts: 165
Re: U Gui Image Set Sprite [SOLVED]
« Reply #7 on: April 02, 2019, 08: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.