// Start is called before the first frame update void Start() { // Welcome Message, showing that the communication between C++ dll and Unity was established correctly. Debug.Log("Connection between C++ Interface and Unity established with success !\n"); PluxDevManager = new PluxDeviceManager(ScanResults, ConnectionDone); int welcomeNumber = PluxDevManager.WelcomeFunctionUnity(); Debug.Log("Welcome Number: " + welcomeNumber); // Initialization of Variables. MultiThreadList = new List <List <int> >(); ActiveChannels = new List <int>(); // Initialization of graphical zone. WindowGraph.IGraphVisual graphVisual = new WindowGraph.LineGraphVisual(GraphContainer, DotSprite, new Color(0, 158, 227, 0), new Color(0, 158, 227)); GraphContainer = graphVisual.GetGraphContainer(); GraphZone = new WindowGraph(GraphContainer, graphVisual); GraphZone.ShowGraph(new List <int>() { 0 }, graphVisual, -1, (int _i) => "" + (_i), (float _f) => Mathf.RoundToInt(_f) + "k"); // Create a timer that controls the update of real-time plot. System.Timers.Timer waitForPlotTimer = new System.Timers.Timer(); waitForPlotTimer.Elapsed += new ElapsedEventHandler(OnWaitingTimeEnds); waitForPlotTimer.Interval = 1000; // 1 second. waitForPlotTimer.Enabled = true; waitForPlotTimer.AutoReset = true; }
public void OneTimeSetup() { pluxManager = new PluxDeviceManager(ScanResults, ConnectionDone); if (string.IsNullOrEmpty(deviceMacAddr)) { pluxManager.GetDetectableDevicesUnity(new List <string> { "BTH", "BLE" }); } }
// Start is called before the first frame update void Start() { // Welcome Message, showing that the communication between C++ dll and Unity was established correctly. Debug.Log("Connection between C++ Interface and Unity established with success !\n"); PluxDevManager = new PluxDeviceManager(); int welcomeNumber = PluxDevManager.WelcomeFunctionUnity(); Debug.Log("Welcome Number: " + welcomeNumber); // Initialization of Variables. MultiThreadList = new List <List <int> >(); ActiveChannels = new List <int>(); // Initialization of graphical zone. WindowGraph.IGraphVisual graphVisual = new WindowGraph.LineGraphVisual(GraphContainer, DotSprite, new Color(0, 158, 227, 0), new Color(0, 158, 227)); GraphContainer = graphVisual.GetGraphContainer(); GraphZone = new WindowGraph(GraphContainer, graphVisual); GraphZone.ShowGraph(new List <int>() { 0 }, graphVisual, -1, (int _i) => "" + (_i), (float _f) => Mathf.RoundToInt(_f) + "k"); }