Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: miguelfanclub on September 29, 2018, 12:48:59 PM
-
Sprite is a variable type in Playmaker.
Then no action to Get or Set (as the rest of the variable types)
Why??
-
Hi,
You can drag and drop the sprite renderer component to where you place the actions, and it will create a get/set property action, where you can configure what you want to get ort set. To do this most easily, mind the lock functionality in both the inspector as well as the FSM.
Alternative, you can create an object variable type (in variable pane), and then set object type: navigate the drop down lists (press U a few times and find Unity Engine, and then in the submenu, press S a few times to find sprite) and you should have what you need.
Finally, take a look at Linker Wizard (tutorials on YouTube, tool in Playmaker menu).
Cheers,
-
I guess i can also do same stuff to get an int or a complex workaround to set a float, but thing is with a simple get or set, you set an int, a float, a game obejct.... but not a sprite.
Again.
Why?
-
There is get/set sprite on ecosystem, sprite type is now supported in Playmaker, no need for texture mumbo jumbo.
-
@krmko
I dont see them. I see other stuff to do with sprite types but not the simple set/get to just pass the variable to/from FSMs
-
https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/master/Assets/PlayMaker%20Custom%20Actions/Sprite/SetSprite.cs
As for get sprite: http://hutonggames.com/playmakerforum/index.php?topic=19349.msg84332#msg84332
-
No, the get sprite from the ecosystem gets the sprite.render component into a variable. The Game object I want the sprite variable from is a regular game object with 50 variables sprite types.
I need a GET from an fsm sprite variable to another fsm sprite variable
Like we do with Ints, floats etc etc
-
bump
-
Hi,
PlayMaker introduced a wrapper around FsmObject where you can define a type and it will list it in the variable list, but under the hood it's not a new fsmXXX, it's an FsmObject of type XXX
so simply use GetFsmObject and you will see listed the sprite variable.
(https://i.imgur.com/SnKcroL.png)
Bye,
Jean
-
And that worked.
Thanks a lot.