diff --git a/Assets/Prefabs/Overseer/Lit.prefab b/Assets/Prefabs/Overseer/Lit.prefab index ae75ee9..cd323fd 100644 --- a/Assets/Prefabs/Overseer/Lit.prefab +++ b/Assets/Prefabs/Overseer/Lit.prefab @@ -369,22 +369,22 @@ MonoBehaviour: m_SceneId: m_Value: 0 m_AssetId: - i0: 0 - i1: 0 - i2: 0 - i3: 0 - i4: 0 - i5: 0 - i6: 0 - i7: 0 - i8: 0 - i9: 0 - i10: 0 - i11: 0 - i12: 0 - i13: 0 - i14: 0 - i15: 0 + i0: 67 + i1: 135 + i2: 127 + i3: 50 + i4: 175 + i5: 94 + i6: 254 + i7: 244 + i8: 184 + i9: 71 + i10: 112 + i11: 160 + i12: 43 + i13: 23 + i14: 48 + i15: 43 m_ServerOnly: 0 m_LocalPlayerAuthority: 0 --- !u!114 &114898585285612640 @@ -398,4 +398,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e48be4658df94a54491635450e232985, type: 3} m_Name: m_EditorClassIdentifier: - maxTimeAlive: 5 + maxTimeAlive: 30 diff --git a/Assets/Scripts/Controls/OverSeer/OSPointer.cs b/Assets/Scripts/Controls/OverSeer/OSPointer.cs index 6d873bd..f6199ce 100644 --- a/Assets/Scripts/Controls/OverSeer/OSPointer.cs +++ b/Assets/Scripts/Controls/OverSeer/OSPointer.cs @@ -80,10 +80,11 @@ void Update() public spawner s; void SpawnBeacon() { - s = GameObject.Find("client").GetComponent(); + //s = GameObject.Find("client").GetComponent(); var beacon = Instantiate(beaconPrefab, pointer.position, Quaternion.identity); beaconInUse = true; - s.CmdSpawn(beacon); + //s.CmdSpawn(beacon); + GameObject.Find("client").GetComponent().CmdSpawn(pointer.position); // NetworkServer.Spawn(beacon); } } diff --git a/Assets/hanisstuff/prefab/GroundController.prefab b/Assets/hanisstuff/prefab/GroundController.prefab index d2c2ef4..80b7af1 100644 --- a/Assets/hanisstuff/prefab/GroundController.prefab +++ b/Assets/hanisstuff/prefab/GroundController.prefab @@ -340,6 +340,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7c7960f1218ec574f983feeb881ebd44, type: 3} m_Name: m_EditorClassIdentifier: + beaconPrefab: {fileID: 1627837743720578, guid: 43877f32af5efef4b84770a02b17302b, + type: 2} --- !u!114 &114552154234673556 MonoBehaviour: m_ObjectHideFlags: 1 diff --git a/Assets/spawner.cs b/Assets/spawner.cs index 3a6bf81..1c6cec8 100644 --- a/Assets/spawner.cs +++ b/Assets/spawner.cs @@ -5,12 +5,17 @@ public class spawner : NetworkBehaviour { + + public GameObject beaconPrefab; [Command] - public void CmdSpawn(GameObject o) + public void CmdSpawn(Vector3 position) + //public void CmdSpawn(ref GameObject ) { Debug.Log(gameObject.name); Debug.Log("FWIOEHDFWOEUFHOUWEFHUOEFHEHW"); - ClientScene.RegisterPrefab(o); - NetworkServer.Spawn(o); + //ClientScene.RegisterPrefab(o); + var beacon = Instantiate(beaconPrefab, position, Quaternion.identity); + //NetworkServer.Spawn(beacon); } + }