unity how to implement interface code example
Example 1: unity interface
public interface ISomethingable<T>
{
int RandomVar {get; set}
void Function(T Arg);
}
public class Thingy : MonoBehaviour, ISomethingable<T>
{
public void Function(int Arg)
{
Debug.Log(Arg);
}
}
Example 2: How to create an interface unity
public interface ISomethingable<T>
{
int RandomVar {get; set}
void Function(T Arg);
}
public class Thingy : MonoBehaviour, ISomethingable<T>
{
public void Function(int Arg)
{
Debug.Log(Arg);
}
}