Using Mono DLLs in a Unity Project

Using Mono DLLs in a Unity Project

  The path to the Unity DLLs will typically be:

  

  一个生成dll的例子如下:

  mcs -r:/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll -target:library ClassesForDLL.cs

  Once compiled, the DLL file can simply be dragged into the Unity project like any other asset. The DLL asset has a foldout triangle which can be used to reveal the separate classes inside the library. Classes that derive from MonoBehaviour can be dragged onto Game Objects like ordinary scripts. Non-MonoBehaviour classes can be used directly from other scripts in the usual way.  

  创建DLL:In MonoDevelop, you do this by selecting File > New > Solution and then choosing C# > Library.

  引用DLL:In MonoDevelop, you should open the contextual menu For Referencesin the Solution Browser and choose Edit References. Then, choose the option .Net Assembly tab > File System > select file.

参考:http://docs.unity3d.com/Manual/UsingDLL.html

时间: 2024-08-26 22:47:41

Using Mono DLLs in a Unity Project的相关文章

unity project和Hierarchy

1.project区的文件夹创建很重要,一定要有条理有框架,不然到最后找东西的时候你肯定会后悔的~比如下图是我在另外一个帖子发的一个小的绘图工具的开发界面~ 2.Hierarchy面版的游戏物体关系一定一定一定要整理好,这里涉及到很多父子关系,也是你整个项目体系的体现,所以在启动一个项目时不如先静下心来设计一下整个系统框架,然后在组织这里的各种物体,好的有条理的构架能为各个物体.脚本.组件间的信息传递提供更好的前提,无论是在脚本编写还是在执行效率上,这都是非常必要的以下还是刚刚那个绘图软件的开发

Unity3D用户手册

Welcome to Unity. 欢迎使用Unity. Unity is made to empower users to create the best interactive entertainment or multimedia experience that they can. This manual is designed to help you learn how to use Unity, from basic to advanced techniques. It can be

Mono、Unity和Xamarin三者关系

1.Mono: .net是微软出的标准.如果站在Mono的角度来说,这套标准能规定编译器产生一些符合一定条件的文件出来,这些中间文件最后在目标平台上被解析成跟机器相关的东西.问题是,开始只有Windows上才能运行.net标准的代码.因为其他如Linux之类的机器上没有相应的基础库和相关的执行文件来解析这种标准下的东西.所以,就产生了Mono.Mono的目标是在尽可能多的平台上使.net标准的东西能正常运行的一套工具,叫framework也好,叫库也好,核心在于“跨平台的让.net代码能运行起来

UniMelb Comp30022 IT Project (Capstone) - 2.Vuforia in Unity

2 Vuforia in Unity Tutorial: https://www.youtube.com/watch?v=X6djed8e4n0&t=213s Preparation: Download "Vuforia for Unity" from https://developer.vuforia.com/downloads/sdk?d=windows-30-16-4815&retU import Vuforia into Unity by dragging &q

Unity 和 Visual Studio Code ( VS Code ) 第三弹 - Unity Debugger Extension Preview

孙广东   2015.12.5 要想实现这样的调试需要  vs Code 的 一个扩展. Release Notes Version 0.1.0: 可以使VS code 附加到 Unity editor. Download unity-debug-0.1.0.zip Install instructions 安装 Visual Studio Code 0.10 或者更高 . 下载 unity-debug zip-file 并解压为:  "unity-debug"  文件夹  . (pa

Unity[C#] Reflection To Update Scripts

我正在使用Unity 3D的一个项目.这个项目是一个Android的应用,它会下载AssetBundles并加载它们的内容,但由于AssetBundles不能包含脚本,我将使用预编译的C#脚本,并使用Mono反射来加载它(我不知道我会怎样,但看着办吧) .但现在我不知道该如何预编译.cs文件,所以任何人都可以帮助我? 答:把你的脚本通过MonoDevelop / VisualStudio编译成.dll,将你script.dll复制到您的统一项目的资产文件夹,将扩展名从.dll文件到.bytes

转一篇关于如何在Unity里使用Protobuf

原帖地址: http://purdyjotut.blogspot.com/2013/10/using-protobuf-in-unity3d.html 先转过来,等时间合适了,再来收拾 Using Protobuf In Unity3D Recently in our projects at LoneWolfPack Interactive, we looked for faster and more efficient ways to store data. In the past we ha

Unity 实现物体破碎效果(转)

感谢网友分享,原文地址(How to Make an Object Shatter Into Smaller Fragments in Unity),中文翻译地址(Unity实现物体破碎效果) In this tutorial I will show you how to create a simple shattering effect for your Unity game. Instead of just "deleting" a crate (or any other obje

Unity3D学习(一):简单梳理下Unity跨平台的机制原理

前言 首先需要了解的是,Unity3D的C#基础脚本模块是通过Mono来实现的. 什么是Mono? 参考下百度百科:Mono是一个由Novell公司(由Xamarin发起)主持的项目,并由Miguel de lcaza领导的,一个致力于开创.NET在Linux上使用的开源工程.它包含了一个C#语言的编译器,一个CLR的Runtime,和一组类库,并实现了 ADO NET和ASP NET. 它基于CLI(通用语言架构)和C#的ECMA标准,提供了了微软.Net FrameWork的另一种实现. M