From 72fe88deb45f71f7a9f6ffbe7b95e03ba181fcfb Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 28 May 2021 16:55:27 +0900 Subject: [PATCH] fix SettingsProvider #if --- Assets/UniGLTF/Editor/UniGLTF/UniGLTFPreference.cs | 6 ++++-- Assets/VRM/Editor/VrmPreference.cs | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/UniGLTF/Editor/UniGLTF/UniGLTFPreference.cs b/Assets/UniGLTF/Editor/UniGLTF/UniGLTFPreference.cs index d89cfe78a..c57ff47d1 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/UniGLTFPreference.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/UniGLTFPreference.cs @@ -2,8 +2,10 @@ using UnityEngine; using UnityEditor; using System.Linq; using System; -using System.IO; using System.Collections.Generic; +#if UNITY_2019_1_OR_NEWER +using UnityEditor.Graphs; +#endif namespace UniGLTF { @@ -40,7 +42,7 @@ namespace UniGLTF { var provider = new SettingsProvider("Preferences/UniGLTF", SettingsScope.User, SettingsProvider.GetSearchKeywordsFromGUIContentProperties()); - provider.guiHandler = (sarchContext) => OnGUI(); + provider.guiHandler = (sarchContext) => OnPreferenceGUI(); return provider; } #else diff --git a/Assets/VRM/Editor/VrmPreference.cs b/Assets/VRM/Editor/VrmPreference.cs index 41a31608c..d20f2fa24 100644 --- a/Assets/VRM/Editor/VrmPreference.cs +++ b/Assets/VRM/Editor/VrmPreference.cs @@ -1,4 +1,7 @@ using UnityEditor; +#if UNITY_2019_1_OR_NEWER +using UnityEditor.Graphs; +#endif namespace VRM { @@ -13,7 +16,7 @@ namespace VRM { var provider = new SettingsProvider("Preferences/VRM0", SettingsScope.User, SettingsProvider.GetSearchKeywordsFromGUIContentProperties()); - provider.guiHandler = (sarchContext) => OnGUI(); + provider.guiHandler = (sarchContext) => OnPreferenceGUI(); return provider; } #else