Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: zzap64 on June 03, 2024, 05:00:32 PM
-
I'm trying to obtain the GetLongitude variable value from this script into Playmaker:
public static double GetLongitude()
{
#if UNITY_IOS
if(Application.platform == RuntimePlatform.IPhonePlayer)
{
return getLongitude();
}
Do I use Call / Invoke Method action to obtain this? I've tried experimenting with it but am unable to succeed :/
Any pointers would be appreciated, thanks.
-
Call Methods are used when a script contains a function that playmaker can read.
In most cases it can't. So you have two options:
1) Drag the script from the inspector tab into the empty area inside a state where you place your actions. You can then Get or Set it's property. In this case select Get. Then you'll have options that may allow you to get that variable.
2) If the above doesn't work, copy that script and paste it into GPT asking it to allow you to be able to read it in playmaker. It may make a mistake or two. Trial and error, until you get it right. This usually takes a minute at best.
Hope that helps you.
-
Thanks mate,
The script drag doesnt work for me :/ however, i'm trying out some scripts with C-GPT and hopefully that guides me. I'll update on my progress.
Thanks for the reply , appreciate it :)