I have a class for my enemy which extends from MonoBehaviour. This class has inside a reference to another class that I have made:
[RequireComponent (typeof (Action))]
public class EnemyController : MonoBehaviour {
public Action action; // Action is an interface!
}
Now, I would like to “inject” this dependency using the Unity GUI, just dragging and dropping the desired object into the EnemyController. The problem is that Action is an interface, so Unity tells me that the class can’t be abstract.
My idea was to be able to use different types of Actions… Is it possible to do this?
Thanks!