// Further organizes all the job stuff. This includes splash screen text, job title & information, // and interview questions void OrganizeJobInfo(string[] fileInfo, int startIndex, int endIndex) { // All needed variables for new node int splashPageStart = 0, infoStart = 0, questionsStart = 0, infoEnd = 0, splashPageEnd = 0, questionsEnd = 0; // Get a sub array with just job information //int len = endIndex - startIndex; bool splashPagePresent = false; // Get start points & lengths of everything for (int i = 0; i < fileInfo.Length - 1; i++) { if (fileInfo[i].Equals("SPLASH_PAGE")) { splashPageStart = i; if (fileInfo[i + 1].Equals("SPLASH_PAGE_END")) { splashPagePresent = false; } else { splashPagePresent = true; } } if (fileInfo[i].Equals("INFORMATION")) { infoStart = i; } if (fileInfo[i].Equals("QUESTIONS")) { questionsStart = i; } if (fileInfo[i].Equals("SPLASH_PAGE_END") && splashPagePresent) { splashPageEnd = i; } if (fileInfo[i].Equals("INFORMATION_END")) { infoEnd = i; } if (fileInfo[i].Equals("QUESTIONS_END")) { questionsEnd = i; break; // this is all we need at this point. } }// end for loop string[] splashPageInfo; if (splashPagePresent) { splashPageInfo = GetArrayInfo(fileInfo, splashPageStart + 1, splashPageEnd - 1); } else { splashPageInfo = new string[1] { "false" }; } string[] questions = GetArrayInfo(fileInfo, questionsStart + 1, questionsEnd - 1); string[] allInfoArr = GetArrayInfo(fileInfo, infoStart, infoEnd); // Get job title, which is right after the INFORMATION tag string jobTitle = fileInfo[infoStart + 1]; string[] jobInfo = GetArrayInfo(fileInfo, infoStart + 2, infoEnd - 1); // Get the rest of the job information. // Save all info into JobInfo node jobInfoNode = new JobInfo(splashPageInfo, questions, jobTitle, jobInfo); //Debug.Log(jobInfoNode.GetJobTitle()); Debug.Log("Questions length: " + jobInfoNode.GetQuestions().Length); // Get job information //jobTitle = splashPageInfo[infoStart]; }// end OrganizeJobInfo