I’m using Unity linked with VSCode (in Ubuntu 18.04) and I’m getting a warning that a method is obsolete in the snippet below that belongs to the VSCode.cs file in the Plugins/Editor directory of my project:
> static void OnScriptReload()
{
EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged;
EditorApplication.playmodeStateChanged += OnPlaymodeStateChanged;
}
Which gives me the following warning:
'EditorApplication.playmodeStateChanged' is obsolete: 'Use EditorApplication.playModeStateChanged and/or EditorApplication.pauseStateChanged' [Assembly-CSharp-Editor]csharp(CS0618)
If I try to edit the code above and use the suggested syntax (seems it’s the same thing with the M capitalized in “mode”), it gives me another error:
No overload for 'OnPlaymodeStateChanged' matches delegate 'Action<PlayModeStateChange>' [Assembly-CSharp-Editor]csharp(CS0123)