I have a GameObject with a script called Savable.js attached now Savable has a public variable called scriptWithFunctions. This variable is in the inspector and I want to be able to drag any script on to the scriptWithFunctions. Then the Savable will call a function in the scriptWithFunctions script, however I do not know the name of the script ahead of time. I need to be able to do this.
#pragma strict
var typeId = "none";
var saveFunctions : Any Type Of Script;
function callStuff() {
saveFunctions.someFunction();
}
But it is not working, please help