Skip to content

Commit

Permalink
Merge pull request #1615 from thestonefox/fix/sdk-setup-deprecation
Browse files Browse the repository at this point in the history
fix(SDK): ensure deprecated event is only used in old unity version
  • Loading branch information
thestonefox committed Nov 15, 2017
2 parents fcd27ec + c41db4b commit a82195f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/VRTK/Source/Editor/VRTK_SDKSetupEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ private sealed class SDKSetupGameObjectsDisabler : AssetModificationProcessor
[InitializeOnLoadMethod]
private static void ListenToPlayModeChanges()
{
#if UNITY_2017_2_OR_NEWER
EditorApplication.playModeStateChanged += (PlayModeStateChange state) =>
#else
EditorApplication.playmodeStateChanged += () =>
#endif
{
if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying)
{
Expand Down

0 comments on commit a82195f

Please sign in to comment.