Hi there,

I have a list of scripts

public List<MonoBehaviour> AbilityScripts; 

and through the editor I dragged a few scripts inside this list, scripts that are attached to the same gameObject as the script that contains the list. I’d like to be able to access the contents of the scripts in the list like

AbilityScripts[0].MyVariable = 12; 

or something like that. Nothing I try seems to work though, any ideas?
Thanks in advance!

You need to create your own base class and inherit it from MonoBehaviour
Then each your Ability script will have to inherit from that class

so it will look like:

public class  AbilityBase : MonoBehaviour
{
	//some base stuff for each ability	 
}

public class MySuperAbility : AbilityBase
{
	//some unique of exact ability
}

public List<AbilityBase> AbilityScripts;