Example #1
0
        public override async Task <IReadOnlyList <IDebugLaunchSettings> > QueryDebugTargetsAsync(DebugLaunchOptions launchOptions)
        {
            DebugLaunchSettings settings = new DebugLaunchSettings(launchOptions);

            // The properties that are available are determined by the property XAML files in your project.
            MonoDebugger debuggerProps = await DebuggerProperties.GetMonoDebuggerPropertiesAsync();

            await LoadCERootAsync();

            string projWorkingDirectory = await debuggerProps.MonoDebuggerWorkingDirectory.GetEvaluatedValueAtEndAsync();

            settings.CurrentDirectory = new FileInfo(Command).Directory.FullName;
            settings.Executable       = Command;
            settings.Arguments        = CommandArguments;

            // TODO: Specify the right debugger engine
            settings.LaunchOperation       = DebugLaunchOperation.CreateProcess;
            settings.LaunchDebugEngineGuid = DebuggerEngines.ManagedOnlyEngine;

            if (!File.Exists(settings.Executable))
            {
                MessageBox.Show("CryEngine executable not found. Open \"Project Properties > Configuration Properties > Debugging\" and set \"Command/CommandArguments\" according to your targeted CryEngine runtime.",
                                "Executable not found", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            return(new IDebugLaunchSettings[] { settings });
        }
Example #2
0
        private static async Task LoadCERootAsync()
        {
            MonoDebugger debuggerProps = await _instance.DebuggerProperties.GetMonoDebuggerPropertiesAsync();

            string command = await debuggerProps.MonoDebuggerCommand.GetEvaluatedValueAtEndAsync();

            Command          = Path.GetFullPath(command);
            CommandArguments = await debuggerProps.MonoDebuggerCommandArguments.GetEvaluatedValueAtEndAsync();
        }
Example #3
0
        public override async Task <bool> CanLaunchAsync(DebugLaunchOptions launchOptions)
        {
            MonoDebugger debuggerProps = await DebuggerProperties.GetMonoDebuggerPropertiesAsync();

            string commandValue = await debuggerProps.MonoDebuggerCommand.GetEvaluatedValueAtEndAsync();

            await LoadCERootAsync();

            return(!string.IsNullOrEmpty(commandValue));
        }
Example #4
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            serializedObject.Update();

            MonoDebugger t = (MonoDebugger)target;

            EditorGUILayout.PropertyField(m_Skin);

            if (EditorApplication.isPlaying && IsPrefabInHierarchy(t.gameObject))
            {
                bool activeWindow = EditorGUILayout.Toggle("Active Window", t.ActiveWindow);
                if (activeWindow != t.ActiveWindow)
                {
                    t.ActiveWindow = activeWindow;
                }
            }
            else
            {
                EditorGUILayout.PropertyField(m_ActiveWindow);
            }

            EditorGUILayout.PropertyField(m_ShowFullWindow);

            if (EditorApplication.isPlaying)
            {
                if (GUILayout.Button("Reset Layout"))
                {
                    t.ResetLayout();
                }
            }

            EditorGUILayout.PropertyField(m_ConsoleWindow, true);

            serializedObject.ApplyModifiedProperties();
        }