/// <summary> /// If a directory specified relative to the Unity data dir is not yet in the PATH, add it. /// </summary> /// <param name="dirComponents">A directory name relative to the Unity data dir.</param> private void ConditionallyAddRelativeDir(string relativePortion) { if (IsRelativeDirIncludedInPath(relativePortion)) { // early out. return; } NewDirs.Add(PathTools.Combine(UnityDataDir, relativePortion)); }
/// <summary> /// Checks to see if a directory is included in the path so far (both new and old directories). /// </summary> /// <param name="dir">Directory name</param> /// <returns>true if the given directory name is found in either the new or old directory lists.</returns> private bool IsIncludedInPath(string dir) { return(NewDirs.Contains(dir) || OrigDirs.Contains(dir)); }