zoukankan      html  css  js  c++  java
  • Plugins in Unity

    Plugins in Unity

      In Unity, you normally use scripts to create functionality but you can also include code created outside Unity in the form of aPlugin. There are two kinds of plugins you can use in Unity: Managed plugins and Native plugins.

      Managed plugins is accessible to the standard .NET tools that Unity uses to compile scripts.

      Native plugins are not accessible to Unity’s tools in the way that managed libraries are.

      Unity has extensive support for Plugins, which are libraries of native code written in C, C++, Objective-C, etc. Plugins allow your game code (written in Javascript, C# or Boo) to call functions from these libraries. This feature allows Unity to integrate with middleware libraries or existing C/C++ game code.

      Note: For security reasons, plugins are not usable with webplayers.

      In order to use a plugin you need to do two things:

    • Write functions in a C-based language and compile them into a library.
    • Create a C# script which calls functions in the library.

      The plugin should provide a simple C interface which the C# script then exposes to other user scripts. It is also possible for Unity to call functions exported by the plugin when certain low-level rendering events happen (for example, when a graphics device is created).

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

  • 相关阅读:
    String方法
    多态
    观察者模式
    ArrayList和LinkList
    唐岛湾
    AForge.Net C#的操作视频,照片读写功能
    JqGrid填坑
    日常点滴
    日常点滴
    EF Core 填坑记录
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3973475.html
Copyright © 2011-2022 走看看