C#侧码
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void INTERNAL_set_rotation(ref Quaternion value);
如何将此方法从C ++公开为单声道
感谢。
答案 0 :(得分:8)
您需要致电mono_add_internal_call
:
mono_add_internal_call ("YourClass::INTERNAL_set_rotation", yourclass_INTERNAL_set_rotation);
这里有一些文档:http://www.mono-project.com/Embedding_Mono#Exposing_C_code_to_the_CIL_universe
以下是代码示例:https://github.com/mono/moon/blob/8d8ece884382d653d215b0da5bf633079566d816/src/deployment.cpp#L579