I want to be able to do something like this:
[SerializeField]
MonoBehaviour run;
void Start()
{
gameObject.AddComponent(run);
}
You can select the run script by dragging the script file into the field from the inspector.
Is there a way to achieve this?