Is it possible to load custom assemblies from outside of Assets folder? I mean, I want to have something like a “Mods” folder, outside of my main “Data” folder. To this folder I would drop some Dlls and then load them at runtime. Is it doable with System.Reflection.Assembly.Load call, or something else?
Yes, you can load assemblies via Reflection. You’ll have to be careful about dependencies though, and of course, you cannot define stuff in those assemblies that can be dragged-and-dropped in the editor.
My idea is to expose game API to modders. Could you brief me how to do it? Essentially, I want users to write assemblies using ONLY my game API in C#. This should eliminate all kinds of dependency problems you wrote about. However, I don’t know how to expose game API to external developers, using Mono.