// Start is called before the first frame update void Start() { workQueue = new Queue <SkeletonData>(); allSkeletons = new Dictionary <String, GameObject>(); myMqtt = new Mqtt(); myMqtt.InitMqtt(myMqtt.skeletonTopic); // register a callback-function (we have to implement, see below) which is called by the library when a message was received myMqtt.client.MqttMsgPublishReceived += MqttReceiveCallback; }
public void Start() { myDict = new Dictionary <string, GameObject>(); workQueue = new Queue <updateStruct>(); worldObjects = new Dictionary <string, GameObject>(); // map render strings to GameObjects myDict.Add("drone", Drone); myDict.Add("fire", Fire); myDict.Add("avatar", Avatar); myDict.Add("line", Line); myMqtt = new Mqtt(); myMqtt.InitMqtt(myMqtt.renderTopic); // register a callback-function (we have to implement, see below) which is called by the library when a message was received myMqtt.client.MqttMsgPublishReceived += MqttReceiveCallback; }