文档

Unity Engine

Unity Engine

Call functions

Call unmanaged functions in a native plug-in from C#, and call back into managed code from unmanaged code.
阅读时间1 分钟最后更新于 5 天前

Native plug-in interoperation works in both directions: managed C# code can call unmanaged functions in a native plug-in, and unmanaged code can call back into managed functions through a function pointer.

Topic

Description

Call unmanaged functions from managed codeDeclare and call an unmanaged function in a native plug-in from your C# scripts.
Call managed functions from unmanaged codePass a C# delegate to native code so that unmanaged functions can call back into your managed code.

Additional resources