Skip to content

Instantly share code, notes, and snippets.

@xylude
Created February 3, 2019 00:46
Show Gist options
  • Save xylude/e60d56da3e8bd88223f642540411d60f to your computer and use it in GitHub Desktop.
Save xylude/e60d56da3e8bd88223f642540411d60f to your computer and use it in GitHub Desktop.
using UnityEngine;
using ZenFulcrum.EmbeddedBrowser;
public class GameMenuHandler : MonoBehaviour {
public static GameMenuHandler Instance { get; private set; }
public PointerUIGUI hud;
public Browser GameMenuBrowser { get; private set; }
public void Awake() {
Instance = this;
}
// Use this for initialization
void Start () {
GameMenuBrowser = hud.GetComponent<Browser>();
GameMenuBrowser.RegisterFunction("test", args => Foo());
Debug.Log("Registered test function...");
}
public void Foo() {
Debug.Log("FOO!");
}
// Update is called once per frame
void Update () {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment