diff --git a/Assets/Scripts/Controls/OverSeer/OSPointer.cs b/Assets/Scripts/Controls/OverSeer/OSPointer.cs index 09711e0..6d873bd 100644 --- a/Assets/Scripts/Controls/OverSeer/OSPointer.cs +++ b/Assets/Scripts/Controls/OverSeer/OSPointer.cs @@ -1,9 +1,8 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using UnityEngine.Networking; -public class OSPointer : NetworkBehaviour +public class OSPointer : MonoBehaviour { public string horizontalAxis; public string verticalAxis; @@ -81,7 +80,7 @@ void Update() public spawner s; void SpawnBeacon() { - + s = GameObject.Find("client").GetComponent(); var beacon = Instantiate(beaconPrefab, pointer.position, Quaternion.identity); beaconInUse = true; s.CmdSpawn(beacon); diff --git a/Assets/Third Party/Standard Assets/Characters/FirstPersonCharacter/Scripts/FirstPersonController.cs b/Assets/Third Party/Standard Assets/Characters/FirstPersonCharacter/Scripts/FirstPersonController.cs index a305cba..11e1e7e 100644 --- a/Assets/Third Party/Standard Assets/Characters/FirstPersonCharacter/Scripts/FirstPersonController.cs +++ b/Assets/Third Party/Standard Assets/Characters/FirstPersonCharacter/Scripts/FirstPersonController.cs @@ -96,6 +96,7 @@ private void Start() //4 gameobjects objects total Debug.Log("dfsfsdfsdf"); GameObject.Find("OverseerController").SetActive(false); + gameObject.name = "host"; } //QUESTION: Why we have to do this twice???? @@ -108,6 +109,7 @@ private void Start() //to the host, but the client connected //to the host is still active. gameObject.SetActive(false); + gameObject.name = "hostsClient"; } //If you are the client and you are the localplayer //deactivate yourself @@ -119,6 +121,7 @@ private void Start() { comp.enabled = false; } + gameObject.name = "client"; //GetComponent().enabled = true; } @@ -129,6 +132,7 @@ private void Start() { comp.enabled = false; } + gameObject.name = "clientsHost"; } } diff --git a/Assets/spawner.cs b/Assets/spawner.cs index b9c8008..3a6bf81 100644 --- a/Assets/spawner.cs +++ b/Assets/spawner.cs @@ -10,6 +10,7 @@ public void CmdSpawn(GameObject o) { Debug.Log(gameObject.name); Debug.Log("FWIOEHDFWOEUFHOUWEFHUOEFHEHW"); + ClientScene.RegisterPrefab(o); NetworkServer.Spawn(o); } }