I want to attach a script to a empty gameObject at runtime using addComponent.
But, i don't want to drag the script directly into the project, i want to first build the project and the go into the build folder and drag it there.
After the game starts, i want to load it from there and attach it to the empty gameObject.
If I don't misunderstand you, that's possible.
Resources.Load(...) as TextAsset.
CSharpCodeProviderto dynamically generate a dll.
Componenttype from the dll into the AppDomain.
More on this here: How to load a class from a .cs file