private void Awake() { networkId = NetworkSerializer.Register(this); validEvents = new HashSet <NetworkEventType>(validEventsList); if (networkId == UInt16.MaxValue) { Debug.LogError(this.gameObject.ToString() + " failed network registration!"); } }