Script Wrapper Class

Trying to create a general purpose C# script that holds an array of various other script components. The problem is, I don’t know what type allows me to

  1. allows me to put a variety of scripts in the same array and
  2. allows me to enable and disable the script component.

I tried using the Component class, but there doesn’t seem to be any way to enable or disable through this class. I also can’t do a cast, since I’m using a variety of scripts, and I can’t seem to use .getType to cast.

Is there some type of superclass or wrapper class that I can use? Or is there maybe a better implementation? Any help is appreciated.

Behavior is the class I was looking for apparently. An explicit cast is required, but it’s very simple and works perfectly.

Going to keep this question up in case someone else has this question.