- Home /
Question by
Max 4 · Jun 11, 2011 at 04:07 AM ·
instantiateplayernetworkbce0017
Multiplayer spawning error
So here's what I'm using:
var Player : Transform;
function OnNetworkLoadedLevel ()
{
// Instantiating Player when Network is loaded
Network.Instantiate (Player, Vector3 (Random.Range (5, 95), transform.position.y+4 , Random.Range (5, 95)), transform.rotation);
}
And here's what I'm getting:
Assets/multiplayer/spawning.js(6,29): BCE0017: The best overload for the method 'UnityEngine.Network.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, int)' is not compatible with the argument list '(UnityEngine.Transform, UnityEngine.Vector3, UnityEngine.Quaternion)'.
Any help?
Comment
Best Answer
Answer by testure · Jun 11, 2011 at 06:22 AM
The answer is right there in your question. You passed 3 parameters, it's expecting four. the group int is not optional- try passing 0.
http://unity3d.com/support/documentation/ScriptReference/Network.Instantiate.html