I’m having problem with my event system. I set it up in C# like this
public delegate void FirePressed();
public static event FirePressed Fire;
public delegate void AimPressed();
public static event AimPressed Aim;
public delegate void ActionPressed();
public static event ActionPressed Action;
public void ButtonPressed(string ActiveButton)
{
switch(ActiveButton)
{
case "Fire":
if(Fire != null)
Fire();
break;
case "Aim":
if(Aim != null)
Aim();
break;
case "Action":
if(Action != null)
Action();
break;
}
}
and my javascript code contains this in it
ButtonControl.Aim += ADS;
but unity keeps saying that ButtonControl (the name of the c# script) is an unknown identifier. Does anyone know how to get the JS script to recognize the c# script
FYI I followed all of the compiler procedures.