I'm creating a game editor and I'm at the current stage that I would like the ability to attach scripts to objects (by selecting the string of the method name to be called). That would be saved into the object's scripts to load / run array. That shouldn't be too difficult, the part I'm having trouble with is finding a method to dynamically call functions at runtime based on what script they need to run. Keep in mind this "script" is just C# code.
I need to run the scripts efficiently at game runtime and I can't have complicated lookups to the functions. Is there some way I can do this? I'm thinking delegates / reflection but I'm not sure how to implement any of it.
There's not really any code yet for this specifically but I'll provide whatever is deemed necessary for a reply.