我是C++开发人员,以前从未做过C#。出于好奇心,我正在看Unity的代码,但我不确定是否能理解以下代码:
[FreeFunction(Name = "GameObjectBindings::Internal_CreateGameObject")]
static extern void Internal_CreateGameObject([Writable] GameObject self, string name);在我看来,具体的代码是在外部文件(extern)中实现的,在另一个名为GameObjectBindings的类中,但似乎没有在Unity source内部给出,因为我在处理Internal_CreateGameObject和GameObjectBindings时失败了。FreeFunction到底是什么意思,为什么我找不到Internal_xxx函数?相似链接https://forum.unity.com/threads/how-does-the-freefunction-attribute-work.857653/
提前感谢!
发布于 2020-12-13 22:59:17
它不是完整的unity source code,它只是一个带有C#引用的存储库。所有c++源代码仍然不可访问。
https://stackoverflow.com/questions/65276708
复制相似问题