Hi,
I just bought 2D Toolkit and I'm trying to get some multitouch buttons set up. I keep getting this error when I try to add a script:
"Assets/Standard Assets/Scripts/Button Scripts/JumpButton.cs(17,28): error CS0246: The type or namespace name `tk2dButton' could not be found. Are you missing a using directive or an assembly reference?"
using UnityEngine;
using System.Collections;
public class JumpButton : MonoBehaviour {
tk2dButton button;
// Use this for initialization
void Start () {
button = GetComponent<tk2dButton>();
button.ButtonPressedEvent += ButtonPressed;
button.ButtonAutoFireEvent += ButtonAutoFire;
button.ButtonDownEvent += ButtonDown;
button.ButtonUpEvent += ButtonUp;
}
void ButtonPressed(tk2dButton source)
{
Debug.Log("Pressed");
}
void ButtonAutoFire(tk2dButton source)
{
Debug.Log("Autofire");
}
void ButtonDown(tk2dButton source)
{
Debug.Log("Down");
}
void ButtonUp(tk2dButton source)
{
Debug.Log("Up");
}
// Update is called once per frame
void Update () {
}
}
Is there a simple way to get rid of this error?