Unity3D关于内存优化,内存泄露、多线程、引用C++的dll的问题研究

一、对于要使用c++写好的类dll来提供给unity3d使用,那么我们可以如下:
详情请参考这篇文章

  1. Start Visual Studio 2008.
  2. Select File > New > Project > Other Languages > Visual C++ > Class Library
  3. After project creation, right-click the project and select Properties.
  4. Select Common Properties.
  5. Set the Targeted Framework to .NET Frameworkd 2.0
  6. Set Confuration (at top of tab) to "All Configurations".
  7. Select Configuration Properties > General
  8. Set Common Language Runtime support to Safe.
如果这个C++类需要用到UnityEngine的namespace可以这样引用:
  1. Bring up the project properties. (Right-click the project and select Properties.)
  2. Select Common Properties.
  3. Click Add New Reference...
  4. Browse to and add the UnityEngine.DLL. (E.g. Under C:\Program Files\Unity\Editor\Data\lib)

委屈首先,如果要用到c、c++编写的plugins不能提供给web player哦!这是因为安全问题的考虑。。。有点可惜。
更详细请看这篇官方教程:  http://unity3d.com/support/documentation/Manual/Plugins.html







你可能感兴趣的:(多线程,C++,优化,properties,dll,plugins)