I'm having a problem where I can't get TNManager.CreateEx to make an object. After an excruciating 2 hours of working at it I still can't get it to work!
Here's my code:
public void blahblahblah(){
TNManager.CreateEx(11, true, projectilePrefab, <position>, <rotation>, <someforcevector3variable>));
}
[RCC(11)]
static GameObject OnCreate(GameObject prefab, Vector3 position, Quaternion rotation, Vector3 vel1)
{
GameObject go = Instantiate(prefab, pos, rot) as GameObject;
go.rigidbody2D.AddForce(vel1);
return go;
}
When I execute that code, nothing happens. I don't even get an error. However if I replace the above with the following code, it works just fine except it doesn't work for multiplayer:
public void blahblahblah(){
GameObject proj = Instantiate(projectilePrefab, <position>, <rotation>) as GameObject;
proj.rigidbody2D.AddForce(some vector 3 force here);
}
Can anyone please help?