@@ -13,7 +13,7 @@ public static class PreferencesGUI
1313#if UNITY_2018_3_OR_NEWER
1414 private class MyPrefSettingsProvider : SettingsProvider
1515 {
16- public MyPrefSettingsProvider ( string path , SettingsScope scopes = SettingsScope . User )
16+ public MyPrefSettingsProvider ( string path , SettingsScope scopes = SettingsScope . Project )
1717 : base ( path , scopes )
1818 { }
1919
@@ -26,24 +26,24 @@ public override void OnGUI(string searchContext)
2626 [ SettingsProvider ]
2727 static SettingsProvider NewPreferenceItem ( )
2828 {
29- return new MyPrefSettingsProvider ( "Preferences /Lua Interactive" ) ;
29+ return new MyPrefSettingsProvider ( "Project /Lua Interactive" ) ;
3030 }
3131#else
3232 [ PreferenceItem ( "Lua Interactive" ) ]
3333#endif
3434 public static void OnGUI ( )
3535 {
36- Settings . AutoClearLog = ( Settings . ClearLog ) EditorGUILayout . EnumPopup ( "Auto Clear Log" , Settings . AutoClearLog ) ;
36+ Settings . AutoClearLog = ( ClearLogMode ) EditorGUILayout . EnumPopup ( "Auto Clear Log" , Settings . AutoClearLog ) ;
3737
3838 EditorGUILayout . BeginHorizontal ( ) ;
39- Settings . LuaPath = EditorGUILayout . TextField ( "Lua Script File" , Settings . LuaPath ) ;
39+ Settings . ScriptPath = EditorGUILayout . TextField ( "Lua Script File" , Settings . ScriptPath ) ;
4040 if ( GUILayout . Button ( "Browse" , EditorStyles . miniButton , GUILayout . Width ( 80 ) ) )
4141 BrowseScriptFile ( ) ;
4242 EditorGUILayout . EndHorizontal ( ) ;
43- if ( ! string . IsNullOrEmpty ( Settings . LuaPath ) && ! File . Exists ( Settings . LuaPath ) )
43+ if ( ! string . IsNullOrEmpty ( Settings . ScriptPath ) && ! File . Exists ( Settings . ScriptPath ) )
4444 EditorGUILayout . HelpBox ( "The file not exits" , MessageType . Warning ) ;
4545
46- using ( new EditorGUI . DisabledScope ( string . IsNullOrEmpty ( Settings . LuaPath ) ) )
46+ using ( new EditorGUI . DisabledScope ( string . IsNullOrEmpty ( Settings . ScriptPath ) ) )
4747 {
4848 if ( GUILayout . Button ( "Create defualt lua script" ) )
4949 CreateDefaultScript ( ) ;
@@ -64,13 +64,13 @@ private static void BrowseScriptFile()
6464 folder . MakeRelativeUri ( file )
6565 . ToString ( )
6666 ) ;
67- Settings . LuaPath = relativePath ;
67+ Settings . ScriptPath = relativePath ;
6868 }
6969 }
7070
7171 private static void CreateDefaultScript ( )
7272 {
73- var path = Settings . LuaPath ;
73+ var path = Settings . ScriptPath ;
7474 if ( string . IsNullOrEmpty ( path ) ) return ;
7575
7676 if ( File . Exists ( path ) )
0 commit comments