} //can't be readonly prop because MonoBehaviour protected virtual void Start() { if (ComponentFactory == null) { throw new InvalidOperationException($"The {nameof(ComponentFactory)} is null."); } switch (BroadcastingMode) { case Mode.None: throw new NotImplementedException($"None? Why? This isn't implemented just yet. Sorry from Glader."); case Mode.All: MessageBroadcaster = ComponentFactory.AddTo <AllPeerMessageBroadcastingStrategy>(this.gameObject); break; case Mode.AllExcludingOwner: MessageBroadcaster = ComponentFactory.CreateBuilder() .With(Service <INetworkOwnable> .As(GetComponent(typeof(INetworkOwnable)) as INetworkOwnable)) .AddTo <IgnoreOwnerPeerMessageBroadcastingStrategy>(this.gameObject); break; default: throw new NotImplementedException($"Encoundered {nameof(NetworkMessageBroadcaster.Mode)} setting {BroadcastingMode} that was invalid."); } }