Skip to main content
GameDev.net gamedev.net
🔒 Locked

Scripting in C#/XNA

Started by robee00 Aug 18, 2012 at 9:57 PM 3 replies 1.6k views
Original Post
robee00
robee00
Hi!

I want my engine to use scripts, and I have a List
ApochPiQ
ApochPiQ
When you invoke the compiler, you can pass it a series of options. See the list here. There are options for setting the output file name as well as generating an in-memory buffer of code.

[edit] When generating an assembly in-memory you can use the CompilerResults object to get a reference to the Assembly object that corresponds to your built code. Accessing that property should automatically load the compiled assembly into your program.
robee00
robee00
That's ok, I tried them, using GenerateInMemory = true, but when I use the result (Assemby a = result.CompiledAssembly), then it throws an exception that it couldnt load the xxxxxx.dll.

Edit: I don't know what I did, but now working. Interesting
6677
6677
IronPython can actually be used as a python interpreter embedded into .net applications. Theres a few lua interpreters. I've also seen a few demonstrations of using C# as a scripting language but I assume the above links are something todo with that.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.