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
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