Hello I try to destroy initiated Network Objects.
This is my code:
var gate_team_1 = Network.Instantiate(gates, gates_spawnpoint_team_1, transform.rotation, 0);
var gate_team_2 = Network.Instantiate(gates, gates_spawnpoint_team_2, transform.rotation, 0);
Debug.Log("gates initialized, waiting 5 Seconds");
yield WaitForSeconds (5);
Network.Destroy(gate_team_1);
Network.Destroy(gate_team_2);
Its initiating fine, but after the 5 seconds I get the following error:
MissingMethodException: Method not found: 'UnityEngine.Network.Destroy'.
I saw that u have to call Destroy on the Initiated Object. But I dont like to give so many prefabs some scripts. Isnt there a way like I do?
Thanks