void Start() { // Should we enable the compiler for our domain // This is requried if we want to load C# scripts as opposed to assemblies bool initCompiler = true; // Create our domain domain = ScriptDomain.CreateDomain("ModDomain", initCompiler); // Load the source code into our domain ScriptType type = domain.CompileAndLoadScriptSource(sourceCode); // Create an instance of our type ScriptProxy proxy = type.CreateInstance(); // We know that the 'Test' class implements the 'IExampleInterface' so we can access the implementation like this: IExampleInterface instance = proxy.GetInstanceAs <IExampleInterface>(true); // Call the hello method on the instance instance.SayHello(); // Call the goodbye method in the instance instance.SayGoodbye(); }