// Start is called before the first frame update private void Start() { TrafficLightManager = TrafficLightManager.Instance; WarningLightManager = SpecialObjectManager.Instance; Debug.Log("Connecting to " + BrokerHostname); Connect(); Client.MqttMsgPublishReceived += client_MqttMsgPublishReceived; byte[] qosLevels = { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE }; Client.Subscribe(new string[] { TeamId + "/#" }, qosLevels); }
/// <summary> /// Runs on the initial load of this script /// </summary> private void Start() { SensorManager = SensorManager.Instance; TrafficLightManager = TrafficLightManager.Instance; SpecialObjectManager = SpecialObjectManager.Instance; TrafficSpawnManager = TrafficSpawnManager.Instance; PathName = Path.PathSequence[0].parent.parent.parent.name; LightName = GetCurrentTrafficlight(); //Make sure there is a path assigned if (Path == null) { Debug.LogError("Movement Path cannot be null, I must have a path to follow.", gameObject); return; } }