void Awake()
        {
            if (m_OtherScenesToBuild == null)
            {
                m_OtherScenesToBuild = new List <string> ();
            }

            if (m_IntegrationTestScenes == null)
            {
                m_IntegrationTestScenes = new List <string> ();
            }

            titleContent  = new GUIContent("Platform runner");
            m_BuildTarget = PlatformRunner.defaultBuildTarget;
            position.Set(position.xMin, position.yMin, 200, position.height);
            m_AllScenesInProject = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.unity", SearchOption.AllDirectories).ToList();
            m_AllScenesInProject.Sort();
            var currentScene     = (Directory.GetCurrentDirectory() + SceneManager.GetActiveScene().path).Replace("\\", "").Replace("/", "");
            var currentScenePath = m_AllScenesInProject.Where(s => s.Replace("\\", "").Replace("/", "") == currentScene);

            m_SelectedScenes.AddRange(currentScenePath);

            m_Interfaces.Add("(Any)");
            m_Interfaces.AddRange(TestRunnerConfigurator.GetAvailableNetworkIPs());
            m_Interfaces.Add("127.0.0.1");

            LoadFromPrefereneces();
        }
Beispiel #2
0
        public PlatformRunnerSettingsWindow()
        {
#if !UNITY_4_6 && !UNITY_4_7 && !UNITY_5_0
            titleContent = new GUIContent("Platform runner");
#else
            title = "Platform runner";
#endif

            m_BuildTarget = PlatformRunner.defaultBuildTarget;
            position.Set(position.xMin, position.yMin, 200, position.height);
            m_SceneList = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.unity", SearchOption.AllDirectories).ToList();
            m_SceneList.Sort();

#if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2
            var currentScene = EditorApplication.currentScene;
#else
            var currentScene = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene().path;
#endif

            currentScene = (Directory.GetCurrentDirectory() + currentScene).Replace("\\", "").Replace("/", "");
            var currentScenePath = m_SceneList.Where(s => s.Replace("\\", "").Replace("/", "") == currentScene);
            m_SelectedScenes.AddRange(currentScenePath);

            m_Interfaces.Add("(Any)");
            m_Interfaces.AddRange(TestRunnerConfigurator.GetAvailableNetworkIPs());
            m_Interfaces.Add("127.0.0.1");
        }
Beispiel #3
0
        public PlatformRunnerSettingsWindow()
        {
            title         = "Platform runner";
            m_BuildTarget = PlatformRunner.defaultBuildTarget;
            position.Set(position.xMin, position.yMin, 200, position.height);
            m_SceneList = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.unity", SearchOption.AllDirectories).ToList();
            m_SceneList.Sort();
            var currentScene     = (Directory.GetCurrentDirectory() + EditorApplication.currentScene).Replace("\\", "").Replace("/", "");
            var currentScenePath = m_SceneList.Where(s => s.Replace("\\", "").Replace("/", "") == currentScene);

            m_SelectedScenes.AddRange(currentScenePath);

            m_Interfaces.Add("(Any)");
            m_Interfaces.AddRange(TestRunnerConfigurator.GetAvailableNetworkIPs());
            m_Interfaces.Add("127.0.0.1");
        }