Esempio n. 1
0
        /// <summary>
        /// Uses the UnityHelpers GetUnityPath method to find the path to the Unity executable, prints the output to the console and returns the result.
        /// </summary>
        /// <returns>The path to the Unity binary.</returns>
        private IEnumerable <string> GetUnityExecutablePath()
        {
            var unityExecutablePaths = UnityHelpers.GetUnityPaths();

            ConsoleHelpers.Write("Unity binaries: ");
            ConsoleHelpers.WriteLine();
            if (unityExecutablePaths.Count() <= 0)
            {
                ConsoleHelpers.ExitOnInput("Failed to find Unity editor binary", ConsoleColor.Red);
            }
            unityExecutablePaths.ToList().ForEach(p => ConsoleHelpers.WriteLine($"{p}", ConsoleColor.Green));
            ConsoleHelpers.WriteLine();
            return(unityExecutablePaths);
        }