title: Loading a script by name in Unity3D
body: <p>I'm creating a game in C# with Unity3D and I need to call a script that I create on runtime, so I know the name of the script because I have an object named exactly like it.</p>
  
  <p>I create the script on runtime and then I save it to my Resources folder, but then I change the scene and need to call that script and attach it to my Empty GameObject in the current scene, so I would like to use something like that:</p>
  
  <pre><code>Script myScript = Resources.Load(myObject.name) as Script;
  </code></pre>
  
  <p>But I know this can't be done like this, so I'm looking for a way I can do what I want, because I need to load that new script to add some functions on runtime.</p>
  
  <p>Do you know any solution to my problem? Thanks a lot!!</p>