Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: laynardo on March 01, 2016, 10:52:05 AM

Title: pulling information from a script
Post by: laynardo on March 01, 2016, 10:52:05 AM
hi, I have seen various threads about triggering a function or the like within a script. But how do i pull info from inside a script. For example, I have this script called Location /Weather info- https://www.assetstore.unity3d.com/en/#!/content/50854. How do I get that info, like state or city into playmaker?
thx, layne
Title: Re: pulling information from a script
Post by: mdotstrange on March 01, 2016, 11:15:26 AM
When trying to set or get data from a script you can use the "set property" and "get property" actions. Drag and drop the script into the action field-
Title: Re: pulling information from a script
Post by: dudebxl on March 01, 2016, 12:37:36 PM
and make sure the variables in the script are public.
Title: Re: pulling information from a script
Post by: laynardo on March 01, 2016, 02:46:50 PM
ok, and the script doesn't have to be attached to a game object correct? I have one script attached as a component calling a few other scripts which initiate the public vars.
Title: Re: pulling information from a script
Post by: laynardo on March 01, 2016, 09:50:02 PM
got it working! that was easy. solved.