Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: szomaza on January 29, 2016, 04:30:08 AM

Title: Canvas Image (Script) SET/GET property problem
Post by: szomaza on January 29, 2016, 04:30:08 AM
With the canvas image script one can animate the image, for example to make it fill radially like a clock.
http://docs.unity3d.com/Manual/script-Image.html

There is a 0-1 float value there for this so I figured I'll just drag the component over to a state and Set Property, but for some reason the set/get property window does not appear when I drag this type of component.
Why is that?
Which Unity components can't be used this way and why?

I am on Unity 5.2.1f1 and Playmaker 1.7.8.3p2.

Thanks in advance,
szomaza
Title: Re: Canvas Image (Script) SET/GET property problem
Post by: mdotstrange on January 29, 2016, 04:32:57 AM
Download the Playmaker ugui actions if you haven't already and it will make this much easier-
Title: Re: Canvas Image (Script) SET/GET property problem
Post by: szomaza on January 29, 2016, 05:07:14 AM
Thanks mdotstrange, I'll check those out and see if I can find what I need among those.

I also realised that if I put an empty Set Property action into a state then I can drag the Image (Script) component into that and it will even work.

So the problem is only why the set/get property window does not appear when the component is dragged over to a state.
Title: Re: Canvas Image (Script) SET/GET property problem
Post by: mdotstrange on January 29, 2016, 05:48:21 AM
Oh now I understand what you are trying to do- you want to access the fill amount on a ugui image?

You are correct with using Set Property- I tried it just now seems to work fine
(http://i.imgur.com/PpLDMGq.png)

make sure you are dragging the Image (Script) component into the field and not the game object it is on.
Title: Re: Canvas Image (Script) SET/GET property problem
Post by: szomaza on January 29, 2016, 10:08:33 AM
Yes, I did not find any action for controlling more comfortably, those ugui image properties, but the Canvas Group Set Alpha and Set Properties saved me from using many generic Set Properties action.

I can also confirm that setting the fill amount and driving it with a Ease Float to make it animate works perfectly.

Let's hope later we'll have a Set Properties action for the Image (Script) uGUI component too.

Thanks,
szomaza