如何编译Unity3D脚本以将其包括在AssetBundle中? [英] How to compile Unity3D script to include it to AssetBundle?

查看:103
本文介绍了如何编译Unity3D脚本以将其包括在AssetBundle中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此手册,我可以将脚本作为二进制数据包括在内并通过Reflection加载它们.我理解所有步骤,除了一个步骤:我如何编译脚本以获取二进制数据以将其存储在.binary文件中?有任何教程/帮助吗?

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: 实际问题可以重申为:如何使用MonoDevelop编译单个文件并获取其字节码"

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

推荐答案

解决方案:

  1. 打开Monodevelop并创建C#Library项目
  2. 将UnityEngine.dll添加到引用
  3. 编译脚本
  4. 将bin/.dll从库项目文件夹复制到统一项目的资产,并将扩展名从.dll更改为.bytes

仅此而已.

这篇关于如何编译Unity3D脚本以将其包括在AssetBundle中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆