/// <summary> /// Open the configurations for an existing beam break sensor or add a new beam break sensor /// </summary> /// <param name="i"></param> public void OnBeamBreakDropdownClicked(int i) { if (i == 0) { return; } if (i - 1 == numBeamBreakers) //Add button { List <GameObject> updatedList = sensorManagerGUI.AddBeamBreaker(); UpdateSensorDropdown(beamBreakerDropdown, updatedList); numBeamBreakers++; if (PlayerPrefs.GetInt("analytics") == 1) { Analytics.CustomEvent("Added Beam Breaker", new Dictionary <string, object> //for analytics tracking { }); } } else //Edit one of the existing sensors { sensorManagerGUI.SetBeamBreakerAsCurrent(i - 1); sensorManagerGUI.StartConfiguration(); } beamBreakerDropdown.value = 0; }
/// <summary> /// Open the configurations for an existing beam break sensor or add a new beam break sensor /// </summary> /// <param name="i"></param> public void OnBeamBreakDropdownValueChanged(int i) { if (i == 0) { return; } if (i - 1 == numBeamBreakers) //Add button { List <GameObject> updatedList = sensorManagerGUI.AddBeamBreaker(); UpdateSensorDropdown(beamBreakerDropdown, updatedList); numBeamBreakers++; AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.SensorTab, AnalyticsLedger.EventAction.Added, "Beam Break", AnalyticsLedger.getMilliseconds().ToString()); } else //Edit one of the existing sensors { sensorManagerGUI.SetBeamBreakerAsCurrent(i - 1); sensorManagerGUI.StartConfiguration(); AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.SensorTab, AnalyticsLedger.EventAction.Edited, "Beam Break", AnalyticsLedger.getMilliseconds().ToString()); } beamBreakerDropdown.value = 0; AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.SensorTab, AnalyticsLedger.EventAction.Clicked, "Dropdown - Beam Break", AnalyticsLedger.getMilliseconds().ToString()); }