void Awake() { // Load the decision tree decisionTreeController = FindObjectOfType <DecisionTreeController>(); if (decisionTreeController != null) { var path = decisionTreeController.pathDecisionXMLFile; decisionTree = DecisionTree.Load(path); } else { Debug.LogWarning("Scenario controller could not get the Decision Tree Controller"); } // Get the traffic DB TrafficIntegrationController tic = FindObjectOfType <TrafficIntegrationController>(); if (tic != null) { if (tic.typeOfIntegration == TrafficIntegrationController.TypeOfIntegration.DecisionTreeIntegration) { trafficDB = FindObjectOfType <TrafficIntegrationData>(); if (trafficDB == null) { Debug.LogWarning("Scenario controller could not get the Traffic Integration Data"); } } else { Debug.LogWarning("Traffic Integration Controller not set for using decision tree integration"); } } // Get the DecisionUIController decisionUI = FindObjectOfType <DecisionUIController>(); // Get the TimeController timeController = FindObjectOfType <TimeController>(); }
void Awake() { decisionUI = FindObjectOfType <DecisionUIController>(); }
// Constructor SimQuestion() { decisionUI = GameObject.FindObjectOfType <DecisionUIController>(); }