How to compile Unity3D script to include it to Ass

2019-01-20 15:08发布

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"

标签: unity3d
1条回答
神经病院院长
2楼-- · 2019-01-20 15:21

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.

查看更多
登录 后发表回答