Is it possible to store two differently named scripts in the one variable

Hi there!

I have this script that I am using a lot in my scene where I’d love to be able to store different scripts in the one variable. Is that possible?

So at the moment I might have something like this -

var ButtonScript1 : BScript1.js;
var ButtonScript2 : BScript2.js;
var ButtonScript3 : BScript3.js;

But I’d really like to have something like this -

var ButtonScript : Script;

and be able to store any of the Script#.js scripts in that variable, since all of the Script#.js contain the same functions but they each do different things.

Hope that makes sense…
Thanks,
Pete

Implement an interface or inherit from the same base class.