void RenderBeam(Vector3 source, Vector3 target) { GameObject instance = Instantiate(beamPrefab); BeamController beamController = instance.GetComponent <BeamController>(); if (beamController == null) { Debug.LogError("The beam prefab requires a beam controller"); return; } NetworkServer.Spawn(instance); beamController.RpcFire(source, target); }