Instantiate error:
Options
TyHover
✭
using UnityEngine; using System.Collections; public class Spawn : MonoBehaviour { public GameObject Item; private float Timer; void Awake (){ Timer = Time.time + 10; } void Update (){ if (Timer < Time.time) { PhotonNetwork.Instantiate(Item, transform.position, transform.rotation); Timer = Time.time + 10; } } }??
I need to use variable GameObject.
error:
No overload for method "Instantiate" takes '3' arguments
0
Comments
-
help-me0
-
Hi TyHover,
please take a look at the docs over here: https://doc.photonengine.com/en/pun/current/tutorials/instantiation
There is an example on how Network Instantiation works, since it is slightly different than in Unity itself.2