Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: rik on October 20, 2015, 12:58:15 PM
-
Hi
i want to replace if in c#
with playmaker bool true can any one share script
-
Hi,
i think we need a bit more info to know what you want
Do you want a playmaker bool to connect to a C# script?
-
yea i want to connect playmaker in to script
i have if statements i need to replace with playmaker
-
Hi,
Maybe this (https://www.youtube.com/watch?v=QVG-336_PsM) Tutorial can help you
-
This tutorial does not teach how to replace "if" any one can share sample script
replacing "if "with playmaker bool true.
-
Hi, try this :
using UnityEngine;
using System.Collections;
using HutongGames.PlayMaker;
public class GetBoolSample : MonoBehaviour
{
public bool theBool;
// Use this for initialization
void OnEnter ()
{
}
// Update is called once per frame
void Update ()
{
theBool = FsmVariables.GlobalVariables.GetFsmBool("MyBool").Value;
if(theBool)
{
Debug.Log("bool is true");
}
}
}
MyBool = the Playmaker global bool