I’m getting a few errors on my script.
using UnityEngine;
using System.Collections;
using HutongGames.PlayMaker;
public class Score : MonoBehaviour
{
public FsmInt score = FsmVariables.GlobalVariables.GetFsmInt("Count");
public FsmInt tryCount = FsmVariables.GlobalVariables.GetFsmInt("Score");
public UILabel scoreLabel = GameObject.Find("Score").GetComponent<UILabel> ();
public UILabel tryCountLabel = GameObject.Find ("Count").GetComponent<UILabel>();
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
scoreLabel.text = score.Value.ToString ();
tryCountLabel.text = tryCount.Value.ToString ();
}
}
I tried doing this in playmaker but couldn’t figure out if it’s possible so I made a script.