Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: strange_aeons on February 07, 2015, 11:35:53 PM

Title: Question about using Get Property with Sprites
Post by: strange_aeons on February 07, 2015, 11:35:53 PM
I am attempting to get the sprite being displayed by an Image in the uGUI and display it elsewhere by setting the sprite property of another Image to the original one.

The problem i've run into is that Get Property, when i drag the component that contains the targeted Sprite info, it wants me to store the result in a Object variable, but it does not let me pick ANY variable at all. am i doing it wrong?
Title: Re: Question about using Get Property with Sprites
Post by: VascBogdan on February 08, 2015, 06:07:36 AM
Be sure you didn't create a GameObject variable. Object is not the same as GameObject.
Title: Re: Question about using Get Property with Sprites
Post by: strange_aeons on February 08, 2015, 07:47:50 AM
neither seem to be accepted by Get Property, why would my one not accept the Object variable? because i tried every variable and nothing came up as an option to use with that action.
Title: Re: Question about using Get Property with Sprites
Post by: Lane on February 09, 2015, 03:32:07 PM
You should be able to make an Object variable, then in the Variable Inspector choose the TYPE of Object variable it is. Likely something like Unity Engine > UI > Sprite somethingsomething or the like.

With Object variables you have to pre-define what they are before they can be recognized and used correctly by the Actions.