C# Client 0.0.0.7
C# Library to interface with Corelink
Loading...
Searching...
No Matches
MB_ReceiverStream.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using UnityEngine;
3
4namespace CoreLink
5{
12
13 public class ReceiverStream : MonoBehaviour
14 {
15 public string workspace = "Holodeck";
16 public List<string> type;
17 protected List<uint> streamIDs = new List<uint>();
18 protected Control control;
19 protected uint streamID;
20 virtual public void Initialize(ref Control control, List<uint> streamIDs = null)
21 {
22 this.control = control;
23 this.type.Add("unity");
24 this.streamIDs = control.createReceiver(new ReceiverStreamParams("Holodeck", this.type, this, true));
25 this.streamIDs = control.subscribe(this.streamIDs);
26 }
27
28 virtual public void OnMessage(uint streamID, byte[] header, byte[] message)
29 {
30 Debug.Log("'You abandoned me!' - " + message);
31 }
32 }
33}