/// <summary> /// Awakes the script. /// </summary> void Awake() { visualizer = FindObjectOfType <VVisVisualizer>(); selectedRows = new List <string>(); fulldbPath = Application.streamingAssetsPath + dbPathFromStreamingAsset; }
/// <summary> /// Awake method. /// </summary> void Awake() { vVisVisualizer = FindObjectOfType <VVisVisualizer>(); queryListObj = new VVisQueryList(); if (loadQueriesFromXML) { Debug.Log("Loading queries from XML File"); fullxmlFilePath = Application.streamingAssetsPath + xmlFilePathFromStreamingAssets; if (File.Exists(fullxmlFilePath)) { //Read the query list deserializing from the XML file using (var stream = new FileStream(fullxmlFilePath, FileMode.Open)) { var serializer = new XmlSerializer(typeof(VVisQueryList)); queryListObj = serializer.Deserialize(stream) as VVisQueryList; } } else { Debug.LogError("The XML file to load the queries could not be found, loading default queries..."); FillDefaultQueryList(); } } else { FillDefaultQueryList(); } FillDropDownList(); UpdateCaptionBox(); // Set event for caption box queryDropdown.onValueChanged.AddListener(delegate { UpdateCaptionBox(); }); }