2

According to this manual I can include scripts as binary data and load them via Reflection. I understand all steps, except one: how can I compile script to get binary data for stroring it in .binary file? Is there any tutorial/help?

UPD: Actual question can be restated as: "How can I compile single file with MonoDevelop and get its bytecode"

4
  • I've asked this in both places. There is [unity3d] tag, so some people can help me. If I'll find answer myself, I'm going to post it here to help google index this question. Commented May 29, 2012 at 23:21
  • From the link you provided: You can create your assemblies in any normal C# IDE (e.g. Monodevelop, Visual Studio) or any text editor using the mono/.net compilers. Commented May 29, 2012 at 23:22
  • I've updated the question. Actually I can't find how to compile single file with monodevelop and get its bytecode Commented May 29, 2012 at 23:37
  • Now that should be a question that somebody can answer. I've never used MonoDevelop, but I get this after a quick google: http://www.mono-project.com/CSharp_Compiler Commented May 30, 2012 at 0:23

1 Answer 1

4

Solution:

  1. Open Monodevelop and create C#Library project
  2. Add UnityEngine.dll to References
  3. Compile your scripts
  4. Copy bin/.dll from your library project folder to Assets of your unity project and change extension from .dll to .bytes

That's all.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.