This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void Awake() | |
{ | |
base.Awake(); | |
// TODO: My awesome code here | |
} | |
protected override void Start() | |
{ | |
base.Start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine | |
using BeardedManStudios.Network; | |
public class SendMyVarsMethods : NetworkedMonoBehavior | |
{ | |
public int number = 53; | |
private Vector3 direction = new Vector3(15.3f, 3.74f, 9.5f); | |
protected override void Awake() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine | |
using BeardedManStudios.Network; | |
public class SendMyVarsLambdas : NetworkedMonoBehavior | |
{ | |
public int number = 53; | |
private Vector3 direction = new Vector3(15.3f, 3.74f, 9.5f); | |
protected override void Awake() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine | |
using BeardedManStudios.Network; | |
public class SendOtherComponentVars : NetworkedMonoBehavior | |
{ | |
protected override void Awake() | |
{ | |
base.Awake(); | |
// Let's serialize the light intensity of this object across the network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class DemoMove : MonoBehaviour | |
{ | |
private void Update() | |
{ | |
if (Input.GetKeyDown(KeyCode.UpArrow)) | |
transform.position += Vector3.up; | |
if (Input.GetKeyDown(KeyCode.DownArrow)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using BeardedManStudios.Network; | |
public class MyClassThing : MonoBehaviour | |
{ | |
public uint id = 55000; | |
public int num = 0; | |
public bool buul = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using BeardedManStudios.Network; | |
public class MoveBallUp : SimpleNetworkedMonoBehavior | |
{ | |
[BRPC] | |
private void MoveBall(Vector3 moveBy) | |
{ | |
transform.position += moveBy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using BeardedManStudios.Network; | |
public class StartGame : MonoBehaviour | |
{ | |
public void Start() | |
{ | |
ushort portNumber = 15937; | |
Networking.InitializeFirewallCheck(portNumber); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using BeardedManStudios.Network; | |
public class MoveCube : NetworkedMonoBehavior | |
{ | |
public float moveSpeed = 5.0f; | |
protected override void OwnerUpdate() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using BeardedManStudios.Network; | |
public class MakePlayer : MonoBehaviour | |
{ | |
private void Start() | |
{ | |
if (Networking.PrimarySocket.Connected) | |
Networking.Instantiate("Guy", NetworkReceivers.AllBuffered); |