-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlayModeStateChange not found in UnityEditor namespace #162
Comments
I'm using the following modification locally for 2017.1.3 diff --git a/Assets/Editor/VSCode.cs b/Assets/Editor/VSCode.cs
index b516da6b64..68afdb6c2b 100644
--- a/Assets/Editor/VSCode.cs
+++ b/Assets/Editor/VSCode.cs
@@ -966,7 +966,11 @@ namespace dotBunny.Unity
/// <summary>
/// Executed when the Editor's playmode changes allowing for capture of required data
/// </summary>
+#if UNITY_2017_2_OR_NEWER
static void OnPlaymodeStateChanged(UnityEditor.PlayModeStateChange state)
+#else
+ static void OnPlaymodeStateChanged()
+#endif
{
if (UnityEngine.Application.isPlaying && EditorApplication.isPlayingOrWillChangePlaymode)
{
@@ -980,8 +984,13 @@ namespace dotBunny.Unity
[UnityEditor.Callbacks.DidReloadScripts()]
static void OnScriptReload()
{
+#if UNITY_2017_2_OR_NEWER
EditorApplication.playModeStateChanged -= OnPlaymodeStateChanged;
EditorApplication.playModeStateChanged += OnPlaymodeStateChanged;
+#else
+ EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged;
+ EditorApplication.playmodeStateChanged += OnPlaymodeStateChanged;
+#endif
}
/// <summary> |
In Unity 2017.4.2 I'm getting Assets/VSCode/Plugins/Editor/VSCode.cs(983,31): warning CS0618: |
It's been fixed on the master branch. Maybe we need a new release? |
On the asset store? shiver |
I was getting my unitypackage from a Github download thing that's not maintained anymore. Getting it from the asset store worked. |
I get this error when I put the VSCode.cs File into Assets/Plugins/Editor folder
Unity Editor 5.6.3xf1 Linux Personal on Ubuntu 16.04 and Visual Studio Code 1.20.1
The text was updated successfully, but these errors were encountered: