public void Enable(bool enabled) { isEnabled = enabled; objId = 0; if (isEnabled && isFirstEnabled) { isFirstEnabled = false; AgentSetup agentSetup = GetComponentInParent <AgentSetup>(); if (agentSetup != null && agentSetup.NeedsBridge != null) { agentSetup.AddToNeedsBridge(this); } } if (detectedObjects != null) { detectedObjects.Clear(); } if (lidarDetectedColliders != null) { lidarDetectedColliders.Clear(); } }
public void Enable(bool enabled) { isEnabled = enabled; objId = 0; if (isEnabled && isFirstEnabled) { isFirstEnabled = false; AgentSetup agentSetup = GetComponentInParent <AgentSetup>(); if (agentSetup != null && agentSetup.NeedsBridge != null) { agentSetup.AddToNeedsBridge(this); } } groundTruthCamera.enabled = enabled; cameraPreview.gameObject.SetActive(enabled); if (detectedObjects != null) { detectedObjects.Clear(); } if (cameraDetectedColliders != null) { cameraDetectedColliders.Clear(); } }
private void SetLEDColor(LEDColorTypes colorIndex) { if (isFirstEnabled) { isFirstEnabled = false; AgentSetup agentSetup = GetComponentInParent <AgentSetup>(); if (agentSetup != null && agentSetup.NeedsBridge != null) { agentSetup.AddToNeedsBridge(this); } } currentLEDColor = colorIndex; }
public void EnableLidarPrediction(bool enabled) { isLidarPredictionEnabled = enabled; if (isLidarPredictionEnabled && isFirstEnabled) { isFirstEnabled = false; AgentSetup agentSetup = GetComponentInParent <AgentSetup>(); if (agentSetup != null && agentSetup.NeedsBridge != null) { agentSetup.AddToNeedsBridge(this); } } if (lidarPredictedVisuals != null) { lidarPredictedVisuals.Clear(); } if (lidarPredictedObjects != null) { lidarPredictedObjects.Clear(); } }
private void SetTopLightMode(bool enabled) { isEnabled = enabled; if (isFirstEnabled) { isFirstEnabled = false; AgentSetup agentSetup = GetComponentInParent <AgentSetup>(); if (agentSetup != null && agentSetup.NeedsBridge != null) { agentSetup.AddToNeedsBridge(this); } } if (enabled == false) { StopAllCoroutines(); ToggleTopLight(enabled); lightRenderer.material.color = offColor; } else { StartCoroutine(BlinkTopLight()); } }