Jump to content
  • Advertisement
Sign in to follow this  
Metzler

[.net] Reflections, Scriptsystem and vice-versa method calling

This topic is 5470 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ahoi, i am currently thinking about writing a script system with c# / .net, using the reflection namespace. Actually what i want to do is, compile a piece of c# code with the csharp.compiler and then call the methods that this c# code contains. My problem now is, that i need some informations from the engine (or the "parent" program). My question is if i can call methods in the "parent" program from my little c# code piece? Would i have to do that via the same way, i.e. using reflections on the "parent" program? Or is there an easier way? Thanks Metzler

Share this post


Link to post
Share on other sites
Advertisement
The easiest way would be to have everything you the the script to have access to in a separate assembly, then when compiling the script simply add a reference to that assembly. No reflection necessary.

Also, check out this thread.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!