Closed sekkit closed 5 years ago
You'll need to expose that constructor to C++ in order to use it. Here's how the JSON looks:
{
"Name": "UnityEngine.GameObject",
"Constructors": [
{
"ParamTypes": []
}
]
}
After generating the bindings, you can create the GameObject
in C++ like so:
GameObject go;
Can't I just GameObject *go = new GameObject()? why create it in stack? I noticed there is no pointer in your cpp plugin bindings
new GameObject() But no gameobject is created in scene. Based on Blog articles, there is a GameObjectNew func can do that? so the question is, how to create GameObject(or any other Plugin generated object) correctly?