I am creating a multiplayer game and have begun work on the inventory, but when it comes to dropping items into the world, I have run into the problem named in the title. Here is the code relating to the error.
Failed Network.Instantiate because we are not connected.
Code (CSharp):
- void DropItem(){
- GameObject droppedItem = Network.Instantiate(Resources.Load("Prefabs/" + draggedItem.itemName), gameObject.transform.position, Quaternion.identity, 0) as GameObject;
- droppedItem.GetComponent<DroppedItem>().CmdSetStats(draggedItem.itemID,...