Invoke function in custom control from Unity
Posted: 26 Mar 2014, 19:16
How would I get the object reference of a custom control from Unity? I was hoping to get it through the NoesisGUIPanel....but I couldn't find it.
for example:
Thanks!
-Paul
for example:
Code: Select all
[Noesis.Extended]
[Noesis.UserControlSource("Assets/GUI/CameraControl.xaml")]
public class CameraControlGUI : Noesis.UserControl
{
public void CallMeFromUnity() {}
}
Code: Select all
using UnityEngine;
using System.Collections;
using Noesis;
public class NoesisGuiUpdater : MonoBehaviour {
NoesisGUIPanel noesisGUI = null;
// Use this for initialization
void Awake ()
{
// Access to the NoesisGUI component
noesisGUI = GetComponent<NoesisGUIPanel>();
}
// Update is called once per frame
void Update () {
//TODO:Call my Function! >_<
//noesisGUI.CallMeFromUnity();
}
}
-Paul