Created
January 4, 2016 22:01
-
-
Save sailro/3f9aac4a4145b345c5e9 to your computer and use it in GitHub Desktop.
Enable/disable VSTU console logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
With the native integration we don’t have a menu to setup options anymore. That’s because the majority of VSTU options are now | |
directly available within Unity project settings. | |
But this is not the case for the console redirection. | |
You should do something like this with an Editor script to properly setup what you want: (only once, this setting is global). | |
*/ | |
using UnityEngine; | |
using SyntaxTree.VisualStudio.Unity.Bridge.Configuration; | |
using UnityEditor; | |
public class Configuration : MonoBehaviour { | |
[MenuItem("VSTU/Enable or Disable SendConsoleToVisualStudio")] | |
static void SwitchSendConsoleToVisualStudio() | |
{ | |
var cfg = Configurations.Active; | |
var status = (cfg.SendConsoleToVisualStudio = !cfg.SendConsoleToVisualStudio) ? "enabled" : "disabled"; | |
EditorUtility.DisplayDialog("VSTU", "SendConsoleToVisualStudio is now " + status, "OK", ""); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for that script. Which license does it have?