title: How do I use a custom class from host in CSharpScript?
body: <p>I'm trying to add in runtime scripting for my game, but am having trouble with an external script being loaded by:</p>
  
  <pre><code>CSharpScript.RunAsync(scriptToRun, null, this);
  </code></pre>
  
  <p>when the script to run uses a class from the host program.</p>
  
  <p>Example:</p>
  
  <p>Host program has a class called Ship
  scriptToRun has:</p>
  
  <pre><code>Ship badGuy = new Ship();
  </code></pre>
  
  <p>and when executing</p>
  
  <pre><code>CSharpScript.RunAsync(scriptToRun, null, this);
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code> error CS0246: The type or namespace name 'Ship' could not be found (are you missing a using directive or an assembly reference?)
  </code></pre>
  
  <p>I assume I need to add a reference to the script, but I can't figure it out.</p>
  
  <p>Thanks.</p>